Our team is trying to get up and running with a real-world app, and we haven’t found any robust and viable routing solution (that works).
There is a project called React Native Router Flux (which builds on top of React Navigation) but we have not been able to get it working in conjunction with state management such as redux. If anyone is interested in this topic and can possibly help, I have sample repository here:
The redux navigation action doesn’t work (if anyone can spot the problem help is appreaciated).
for now you should use react-router for web. you can share a lot of your components and code but react-native navigation libraries do not currently support web very well
We could get our app almost working, but whenever we dispatch an action that changes global state it resets the navigation and puts us back on the home screen. So close yet so far
I’d like to thank you for this comment. I tried 6-8 times to get this to work over the last few months and kept stopping to work on other pressing issues. I kept thinking that web platform fixes were coming and was just waiting for it. This is the post that finally made things click for me. While I didn’t use this exact solution I wanted to add in a few resources to help others in this transition period.
Specifically, this points out that you can add the .native.js file extensions and React Native handles it automatically. I was able to leave all of my routing in place and simply create a new screen to handle the weird navigators.
Also, I had to rip the content out of my drawer component and save it as a separate component that I use exclusively for web.