0

I'm building my first mobile app and am loving what React Native has to offer. One major disadvantage I've encountered is that the Navigator does NOT unmount the scene when a new scene is pushed on the stack. This makes some sense as this is probably necessary for transitions to happen smoothly.

My app uses a video background and seems like other apps using large media files may encounter a similar issue of high and unnecessary resource usage due to this behavior. Maybe a better approach would be to unmount the scene after transition and remount before popping?

I wonder if others have experienced similar issues and may have some feedback. I've already tried ExNavigator and React-Native-Redux-Router. These libraries are just not mature enough for my use cases and seem to have trouble working with Hot-Reloading.

Thanks for reading and replying.

Anshuul Kai
  • 3,876
  • 2
  • 27
  • 48

1 Answers1

1

I wouldn't use React-Native-Redux-Router, its not mainted and was taken over with React-Native-Router-Flux, i used to use RNRF, but have swapped to exponents ex-navigation (https://github.com/exponentjs/ex-navigation), and stay away from Navigator if you're going to start wanting more "complex" apps, as it is no longer maintained, though it does work still.

Which ExNavigator did you use because exponents one is well maintained and extremely fluid so far for what I have been doing, and should fit for most use cases.

If you want to stick with Navigator have you tried replace(route) or the resetTo(route) though you won't have transitions

  • Yes, I've tried resetTo and replace and they lack transitions as you already mentioned so they don't work for my use case. ExNavigator looked nice but I was unable to make it HotReload properly as I'm using redux as well. Not being able to use HotReload makes development much harder so I gave up on ExNav as well. – Anshuul Kai Nov 15 '16 at 14:25
  • Im pretty sure you may have come across this already, But just in case you haven't, https://medium.com/react-native-training/react-native-navigator-experimental-part-2-implementing-redux-c6acbf66eca1#.ineigtnl8, seems to cover HotReload with Nav Experimental (not played with that much myself though) I agree though, HotReload is a life saver, Hope you find your solution, and if you do, let me know what you end up using ^_^ – xXValhallaCoderXx Nov 15 '16 at 19:45
  • Yes, thanks for sharing. I already have this in place and Hot Reloading works fine till I include ExNav. I'll stick with using Navigator for now until ExNav matures enough to HotReload. Thanks again! – Anshuul Kai Nov 16 '16 at 13:25