Explicitly import React in index.js

Summary: Closes https://github.com/facebook/react-native/pull/6950

Differential Revision: D3189346

fb-gh-sync-id: ee6ca4bdd6fee4505b61b621fc508308e78e3290
fbshipit-source-id: ee6ca4bdd6fee4505b61b621fc508308e78e3290
This commit is contained in:
sunnylqm 2016-04-16 17:41:44 -07:00 committed by Facebook Github Bot 9
parent c417c2ee0b
commit 159f657e7e
1 changed files with 28 additions and 10 deletions

View File

@ -50,8 +50,10 @@ var index = React.createClass({
import React, {
Component,
} from 'react';
import {
TabBarIOS,
NavigatorIOS
NavigatorIOS,
} from 'react-native';
class App extends Component {
@ -72,9 +74,11 @@ class App extends Component {
import React, {
Component,
} from 'react';
import {
DrawerLayoutAndroid,
ProgressBarAndroid,
Text
Text,
} from 'react-native';
class App extends Component {
@ -107,9 +111,11 @@ class App extends Component {
import React, {
Component,
} from 'react';
import {
ScrollView,
TouchableHighlight,
Text
Text,
} from 'react-native';
class TouchDemo extends Component {
@ -132,12 +138,14 @@ class TouchDemo extends Component {
<Prism>
{`// iOS & Android
var React, {
import React, {
Component,
} from 'react';
import {
Image,
StyleSheet,
Text,
View
View,
} from 'react-native';
class ReactNative extends Component {
@ -178,7 +186,9 @@ var styles = StyleSheet.create({
import React, {
Component,
Text
} from 'react';
import {
Text,
} from 'react-native';
class GeoInfo extends Component {
@ -234,8 +244,10 @@ RCT_EXPORT_METHOD(processString:(NSString *)input callback:(RCTResponseSenderBlo
import React, {
Component,
} from 'react';
import {
NativeModules,
Text
Text,
} from 'react-native';
class Message extends Component {
@ -285,7 +297,9 @@ RCT_EXPORT_VIEW_PROPERTY(myCustomProperty, NSString);
import React, {
Component,
requireNativeComponent
} from 'react';
import {
requireNativeComponent,
} from 'react-native';
var NativeMyCustomView = requireNativeComponent('MyCustomView', MyCustomView);
@ -327,8 +341,10 @@ public class MyCustomModule extends ReactContextBaseJavaModule {
import React, {
Component,
} from 'react';
import {
NativeModules,
Text
Text,
} from 'react-native';
class Message extends Component {
constructor(props) {
@ -379,7 +395,9 @@ public class MyCustomViewManager extends SimpleViewManager<MyCustomView> {
import React, {
Component,
requireNativeComponent
} from 'react';
import {
requireNativeComponent,
} from 'react-native';
var NativeMyCustomView = requireNativeComponent('MyCustomView', MyCustomView);