Rewrite imports in RNTester to use standard paths (#24317)

Summary:
See https://github.com/facebook/react-native/issues/24316 for the motivation. This commit rewrites the imports in the RNTester project.

[General] [Changed] - Replaced Haste-style imports with standard path-style imports for RNTester
Pull Request resolved: https://github.com/facebook/react-native/pull/24317

Differential Revision: D14870504

Pulled By: cpojer

fbshipit-source-id: b14f22e7ce559efc332ced032617ca581196d90f
This commit is contained in:
James Ide
2019-04-10 10:15:13 -07:00
committed by Facebook Github Bot
parent 265ae58038
commit 26cce3d7a8
103 changed files with 339 additions and 302 deletions

View File

@@ -11,15 +11,15 @@
'use strict';
const React = require('react');
const ReactNative = require('react-native');
const {
Alert,
DeviceEventEmitter,
PushNotificationIOS,
StyleSheet,
Text,
TouchableHighlight,
View,
} = ReactNative;
} = require('react-native');
class Button extends React.Component<$FlowFixMeProps> {
render() {
@@ -86,7 +86,7 @@ class NotificationExample extends React.Component<{}> {
}
_sendNotification() {
require('RCTDeviceEventEmitter').emit('remoteNotificationReceived', {
DeviceEventEmitter.emit('remoteNotificationReceived', {
remote: true,
aps: {
alert: 'Sample notification',
@@ -99,7 +99,7 @@ class NotificationExample extends React.Component<{}> {
}
_sendLocalNotification() {
require('RCTDeviceEventEmitter').emit('localNotificationReceived', {
DeviceEventEmitter.emit('localNotificationReceived', {
aps: {
alert: 'Sample local notification',
badge: '+1',