Ad

Error: `createNavigationContainer()` Has Been Removed. Use `createAppContainer()` Instead

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>

        );
    }
}

enter image description here>

  "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",
Ad

Answer

Try this to see if it work for you

npm i react-navigation-stack --save

Also try to upgrade your package if this is not work

Ref link

Ad
source: stackoverflow.com
Ad