Coder Social home page Coder Social logo

Comments (1)

devika7 avatar devika7 commented on May 2, 2024

Hi @Laurensdc, thanks so much for the above code. I am wondering if it would hold same for react-navigation 3.x.x. I used something similar like yours, and getting this error.

error: "The navigation props is missing for this navigator. in react navigation 3, you need to set up your app container directly. "

I know I need to use CreateAppContainer function somewhere to solve this. Could you please guide me? This is my TestNav file

#TestNav.js

import Portfolio from "./Portfolio";
import SignupScreen from "./SignupScreen";
import ResetPassScreen from "./ResetPassScreen";
import WelcomeScreen from "./WelcomeScreen";
import Logout from "./Logout";
import Investments from "./Investments";
import Profile from "./Profile";
import LoginScreen from "./LoginScreen";
import {createStackNavigator, createBottomTabNavigator } from 'react-navigation';

export const TestNav = createStackNavigator(
    {
        Login: {
            screen: WelcomeScreen,
            screen: LoginScreen,
        },
        Signup: {
            screen: SignupScreen,
            screen: Logout,
        },
        Reset: {
            screen:ResetPassScreen
        },

        mainTabNavigator: {
            screen: createBottomTabNavigator(
                {
                    HomeStack: {
                        screen: createStackNavigator(
                            {
                                Overview: {
                                    screen: Portfolio,
                                },
                               
                            },
                            {
                                headerMode: 'none',
                            }
                        )
                    },
                    LinkStack: {
                       
                        screen: createStackNavigator(
                            {
                               Investments: {
                                    screen: Investments,
                                },
                                
                            },
                            {
                                headerMode: 'none',
                            }
                        )
                    },

                    SettingStack: {
                        screen: Profile,
                    },
                },
                {
                    //tabBarPosition: 'bottom',
                    navigationOptions: ({ navigation }) => ({
                        // ...                         
                    }),
                    tabBarOptions: {
                       // ...
                    },
                }
            )
        }
    },
    {
        headerMode: 'none',
        // onTransitionStart: (e) => {
        //     console.log('Navigating somewhere');
        //     console.log(e);
        // },
    }
);

export default TestNav;

from rfcs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.