I just upgraded react-navigation to v2.0-rc9, and it complains that
You should only render one navigator explicitly in your app, and other navigators should by rendered by including them in that navigator.
I have only one navigator, as shown below, and I can't understand where that comes from. Could you please point to a possible cause for that error ? Below are my root component and the way I create the navigator.
Root.js:
import React, { PureComponent } from 'react';
import { Provider } from 'react-redux';
import store from './store';
import AppNavigation from './AppNavigation';
class Root extends PureComponent {
render() {
return (
<Provider store={store}>
<AppNavigation/>
</Provider>
);
}
}
export default Root;
AppNavigation.js:
import { createStackNavigator } from 'react-navigation';
const AppNavigation = createStackNavigator({
home: HomePage
});
export default AppNavigation;
Try updating the react-navigation to 2.0.2 as according to this issue it is a bug with react-native and not react-navigation. The author seems to have added a patch in version 2.0.2.
Check if it works for you and post any further error on the issue there.
Thanks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With