Reputation: 185
As you can see in my simple code, i am not using createNavigationContainer/createAppContainer but i am getting that error. I do not know why this is happening. I am stuck !
import React, { Component } from 'react';
import {Router, Stack, Scene} from 'react-native-router-flux';
import LogIn from './pages/LogIn';
import SignUp from './pages/SignUp';
import { View } from 'react-native';
export default class Routes extends React.Component {
render(){
return(
<Router>
<Stack key="root" hideNavBar={true}>
<Scene key="LogIn" component={LogIn} title="Login" initial={true}/>
<Scene key="SignUp" component={SignUp} title="SignUp"/>
</Stack>
</Router>
);
}
}
>
"dependencies": {
"expo": "^35.0.0",
"react": "16.8.3",
"react-dom": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
"react-native-gesture-handler": "~1.3.0",
"react-native-reanimated": "~1.2.0",
"react-native-router-flux": "^4.0.6",
"react-native-screens": "~1.0.0-alpha.23",
"react-native-web": "^0.11.7",
"react-navigation": "^4.0.10",
"react-redux": "^7.1.3",
"react-scripts": "^3.2.0",
"redux": "^4.0.4",
"redux-thunk": "^2.3.0",
Upvotes: 2
Views: 1077
Reputation: 1
Read this IMPORTANT NOTES carefully, and change versions on package.json like this
"react-navigation": "^4.0.10",
"react-native-router-flux": "4.2.0-beta.1",
IMPORTANT NOTES
v4.2.0-beta.x is based on React Navigation v4.x
v4.1.0-beta.x is based on React Navigation v3.x
v4.0.x is based on [React Navigation v2.x].
See this branch and docs for v3 based on deprecated React Native Experimental Navigation API. It is not supported and may not work with latest React Native versions. v4.0.0-beta.x is based on React Navigation v1.5.x. See this branch for this version. It is also not supported and may not work with the latest React Native versions.
Upvotes: 0