Skip to content

Instantly share code, notes, and snippets.

@cball
Created February 20, 2017 19:31
Show Gist options
  • Save cball/b66e35b6f4df53ee9d4379af22ffcd74 to your computer and use it in GitHub Desktop.
Save cball/b66e35b6f4df53ee9d4379af22ffcd74 to your computer and use it in GitHub Desktop.
An example of calling the same code from index.android.js and index.ios.js
import React, { Component } from 'react';
import { View, Text } from 'react-native';
class App extends Component {
render () {
return (
<View>
<Text>App here</Text>
</View>
)
}
}
export default App;
import { AppRegistry } from 'react-native';
import App from './App/Containers/App';
AppRegistry.registerComponent('MyCoolApp', () => App);
import { AppRegistry } from 'react-native';
import App from './App/Containers/App';
AppRegistry.registerComponent('MyCoolApp', () => App);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment