moh3n9595 / react-native-dynamic-render

🔀 Render from Json object
MIT License
11 stars 2 forks source link

Dynamically create React Native navigation from a JSON #2

Closed raphkhan closed 3 years ago

raphkhan commented 3 years ago

Essentially, my whole React-Native components are dynamically rendered from a JSON (hosted on Firebase) thanks to react-native-dynamic-render.

My problem is I need the React-Navigation to be dynamically created using that same idea.... For instance, if I delete the page from the pages table, the tab should not be there; if I add one, it should add it on the next app load, etc.

Any ideas on how to do that? Thanks :)

moh3n9595 commented 3 years ago

Hey @raphkhan, since the latest React-Navigation version use components to render screens (sample), you should not have any problem to use them in your JSON. But I try to implement a better demo-example later to see how you can do that.

moh3n9595 commented 3 years ago

Check the latest version (1.1.3). I added a new feature to simplify your idea. For more information, see the example.

raphkhan commented 3 years ago

@moh3n9595 Thank you very much!