Skip to content

Instantly share code, notes, and snippets.

@benvium
Created April 29, 2016 16:17
Show Gist options
  • Save benvium/50efa49ded427445bb9bd44af1375a1a to your computer and use it in GitHub Desktop.
Save benvium/50efa49ded427445bb9bd44af1375a1a to your computer and use it in GitHub Desktop.
Use same root component for android and iOS
import React, {
AppRegistry,
} from 'react-native';
AppRegistry.registerComponent('MyApp', () => require('./app/Root') );
import React, {
AppRegistry,
} from 'react-native';
AppRegistry.registerComponent('MyApp', () => require('./app/Root') );
// Your main root component
import React, {Component} from 'react-native';
export class Root extends Component {
//..
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment