Skip to content

Commit

Permalink
Explicitly import React in index.js
Browse files Browse the repository at this point in the history
Summary: Closes #6950

Differential Revision: D3189346

fb-gh-sync-id: ee6ca4bdd6fee4505b61b621fc508308e78e3290
fbshipit-source-id: ee6ca4bdd6fee4505b61b621fc508308e78e3290
  • Loading branch information
sunnylqm authored and Facebook Github Bot 9 committed Apr 17, 2016
1 parent c417c2e commit 159f657
Showing 1 changed file with 28 additions and 10 deletions.
38 changes: 28 additions & 10 deletions website/src/react-native/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ var index = React.createClass({
import React, {
Component,
} from 'react';
import {
TabBarIOS,
NavigatorIOS
NavigatorIOS,
} from 'react-native';
class App extends Component {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -178,7 +186,9 @@ var styles = StyleSheet.create({
import React, {
Component,
Text
} from 'react';
import {
Text,
} from 'react-native';
class GeoInfo extends Component {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 159f657

Please sign in to comment.