Closed JherysVargas closed 4 years ago
The same error here!
Not sure what's going on. Are you guys using the new React Navigation 5? I haven't checked on compatibility for that version yet.
I have already managed to solve it, react navigation v5 advises not to save navigation in redux, if you are using redux and this library https://github.com/react-navigation/redux-helpers you have to uninstall it and configure your store to not save navigation in redux, with that configuration you can implement without problem react navigation v5.
That makes sense! Most people shouldn’t be using this library anyways. When I upgrade to React Navigation 5 I’ll look into how hard it would be to keep this library working with it. Will leave this issue open to track React Navigation 5 compatibility for now
For a whole lot of reasons, including that React Navigation 5 no longer adheres to the "Flux" model of constraining state changes to actions, it's not going to be possible to keep this library going.
@Ashoat how did you tackle the issue of maintaining the same navigational state when migrating to React-Navigation v5 and consequently away from this library. I.e. user is on a specific screen HomeStack -> PersonStack -> PersonScreen and then updates the app which has an underlying upgrade to React Navigation v5. Do we need to roll a custom solution to make sure the new internal state matches the one in redux or is there something available?
My app doesn't persist navigation state in production, so I'm not sure. I'm not aware of any utilities to convert the v4 navigation state format into the new one, but if an official one exists it would be in @react-navigation/compat
. If this is absolutely necessary in your case, my guess is that you'll need to write your own solution.
Could someone help me solve this error?