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

Can I create scenes/routes during runtime using RNRF? #2354

Closed
pekka opened this issue Sep 8, 2017 · 3 comments
Closed

Can I create scenes/routes during runtime using RNRF? #2354

pekka opened this issue Sep 8, 2017 · 3 comments

Comments

@pekka
Copy link

pekka commented Sep 8, 2017

I am loading a tree of items from a JSON file. Each tree item should be a Screen in the app.
The user should be able to navigate through this tree of screens like in the iOS settings dialog:

Image of iOS settings dialog

I was hoping to load the JSON when the app starts, and to dynamically generate screens and nested navigators based on the data.

This is not possible in React Native Navigation, though: screens need to be known statically.

Is there a way to do this in RNRF, or is it a React Native specific limitation?

I'm still new to RN, sorry if this is a dumb question.

@pekka pekka changed the title Can I add scenes dynamically during runtime using RNRF? Can I create scenes/routes during runtime using RNRF? Sep 8, 2017
@arribbar
Copy link

arribbar commented Sep 8, 2017

Well, RNRF is built on top of react-native-navigation. So it is the same, you cannot generate screens dynamically.

@mcabs3
Copy link
Collaborator

mcabs3 commented Sep 8, 2017

@pekka I would have all of the screens load, but some sort abstraction that will show what routes are available to use versus what aren't. If you are using a store like Redux or Mobx then that would be a good place to store that.

@aksonov
Copy link
Owner

aksonov commented Sep 10, 2017

It is not supported.

@aksonov aksonov closed this as completed Sep 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants