Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DrawerNavigator with dynamic routes should be possible #3591

alex-gunning opened this issue Feb 24, 2018 · 1 comment


Copy link

commented Feb 24, 2018

The issue tracker is reserved for bug reports only.

If you have a question, feature request, or an idea for improving the library or its related tools, please try one of the following resources:

Current Behavior

Please see this snack for what I wish to achieve (with code) :

Look specifically in DrawerNavigation.js

I'm trying to implement a DrawerNavigator with a list of dynamic routes from Redux state. The DrawerNavigator is a child of a TabNavigator. The TabNavigator is setup so there is a menu button which toggles the drawer open and closed.

This is an example of a DrawerNavigator with pre-defined routes:
(I'm not sure why the menu button is now not opening the drawer in this snack but that's what I'm attempting to achieve). It's a copy of the same code above but with static routes initialized.

You'll see that, in the first one, I left a comment about the static router property.
// FoodHOC.router = FoodDrawer.router;

I'm fairly confident that the example would run if I could find a way to add that router property to my HOC.

I'd appreciate any assistance. I've been trying to get this to work for four days.

Expected Behavior

I should be able to define dynamic routes from redux state.

How to reproduce

Run this and examine the source specifically of DrawerNavigator.js:
Then look at this and see how I'm trying to set up dynamic routes in DrawerNavigator.js

Your Environment

software version
react-navigation 1.1.1
react-native 0.52
node 9.4.0
npm 4.6.1

This comment has been minimized.

Copy link

commented Feb 24, 2018

please open a feature request for this. this is not a bug. we don't support dynamic routes.

@brentvatne brentvatne closed this Feb 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.