Reputation: 2110
So I am trying to work from this example App:
https://github.com/aksonov/react-native-router-flux/tree/master/Example
But when I rename the following lines:
index.ios.js
import App from './App';
AppRegistry.registerComponent('App', () => App);
index.android.js
import App from './App';
AppRegistry.registerComponent('App', () => App);
I have rename Example.js
to App.js
and updated the content:
class App extends Component {
render() {
return (
<Router createReducer={reducerCreate} getSceneStyle={getSceneStyle}>
//...
</Router>
);
}
}
export default App;
But when I try to compile the app I receive the following error.
Application Example has not been registered.
This is either due to a require() error during initialisation or failure to call AppRegistery.registerComponent.
Upvotes: 0
Views: 462
Reputation: 3375
package.json
AppRegistry.registerComponent('MyApp', () => MyApp);
Upvotes: 1