Giter Site home page Giter Site logo

Comments (6)

bonbonio avatar bonbonio commented on May 5, 2024

Anyone? :)

from kittentricks.

malashkevich avatar malashkevich commented on May 5, 2024

Hello @bonbonio.
Tbh, I'm not sure I understand what difficulties do you have.
So you want to have separate routes for DrawerNavigation and some another navigation?

from kittentricks.

bonbonio avatar bonbonio commented on May 5, 2024

All the main routes are loaded into the menu.

What I want is to be able to define the routes I want in the menu, but as I am only using 1 level of menu, there will be many routes in the App I will create and wish to navigate to, but I don't want it to be a requirement for them to be in the menu.

So maybe a way to declare all routes, and then a way to declare which routes to load into the DrawerNavigation.

Make sense?

from kittentricks.

malashkevich avatar malashkevich commented on May 5, 2024

Ok, so you want to type routes: Routes that available from sidemenu and routes that will be available as steps from root navigator, right?
If so, why not create this structure:

const DrawerExample = DrawerNavigator({
  Inbox: {
    screen: StackNavigator({
      Inbox: {
        screen: InboxScreen
      },
      Email: {
        screen: EmailScreen
      },
    });,
  },
  Drafts: {
    screen: StackNavigator({
      Drafts: {
        screen: DraftsScreen
      },
      Email: {
        screen: EmailScreen
      },
    });
  },
}, {...});

Took this exmaple from here.

from kittentricks.

bonbonio avatar bonbonio commented on May 5, 2024

So how would that work with the routesBuilder.js used in this example, I'd just declare a new stack under the DrawerNavigator?

A fiddle would help, but I will see what I can do - I am still very new to React/React-Native so I appreciate your help.

from kittentricks.

malashkevich avatar malashkevich commented on May 5, 2024

routeBuilder.js just create structure above automatically. I'm pretty sure you shouldn't do it in your project. As long as you are new in react-native and react-navigation - you better start from simple navigation structures.
So yes, you can create new Stack under Drawer and it's very common use case.

There is quite a good series of articles of @computerjazz. Check them out first. Also most it's better to ask questions regarding react-navigation in theirs repo.

from kittentricks.

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.