-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Upgrade to v4 broke - almost - everything #2150
Comments
Please read 'breaking changes' carefully:
You have to do convertation step-by-step and create issues (if any) for smaller steps. Closing this ticket. About redux - v4 now fully supports redux (state is not 'read-only' like in v3), check #2115 and example repo provided there. |
Thanks for your quick reply and help! I will try to figure it out. cheers! |
Hi, I need help on how to migrate my MenuDrawer from v3 to v4, there are many changes, I'm using react-native-drawer inside a MenuDrawer component but I can't use DefaultRenderer... |
I decided sticking with v3, It gave me too much of a headache hehe. I'll check back in a few weeks time..still getting used to RN and Redux. |
@jaimecorrea try to replace the This strategy I use works with plain react-navigation, and I just verified that it also works with router-flux v4. The advantage of keeping react-native-drawer instead of using react-navigation official drawer: |
Version
Tell us which versions you are using:
I have updated react-native-router-flux from v3 to v4 and my whole navigation is not working anymore. I've tried to read through example.js and the migrating guide but it still isn't clear to me how to solve this problem. In v3 everything worked perfectly with my setup, which used defaultrenderer and navigationState.children, but navigationState.children is gone and I can't seem to find the replacement.
My index.js:
My app.js:
I tried quite some things: first of all, Switch is deprecated so I removed that in Scene key="active" (but it's unclear to me how to replace it). I also had to wrap all my scenes with a 'Root' scene, because I got the error that there should be only one scene. After these two fixes, my app runs but App.js errors because 'this.props.navigationState.children' does not exist anymore. Where do I find the children now? or should it be done differently altogether? Right now the only way to make my app render something, is remove the DefaultRenderer altogether, but then my routing is completely broken. I also do not have a tabbar anymore..it just doesn't show up. It did in v3. Even after removing DefaultRenderer, I can't call most of my scenes (Actions.scenename is undefined my simulator tells me). This seems to be because of the nesting of certain scenes. I can only access those scenes that are not nested in parent scenes. Why is that? Shouldn't I nest scenes? Or is there a different way of calling them? Lastly it also seems my drawer broke. I can't access it anymore. Am I missing one big thing or has the whole structure of RNRF really changed so much from v3 to v4? v4's features seem really nice..but for now it's hard for me to enjoy those 🤣 Last but not least: maybe it has something to do with RouterWithRedux? Because the example is just with 'Router' I thought maybe there's the missing link.
I'm sorry to have made an 'issue' out of this, because this is probably largely due to my own incompetence on the subject matter, but I have really tried following the example/migration docs and have been stuck for the whole day now. Maybe one of you sees the solution, for which I would be extremely grateful. Thanks a lot in advance.
Cheers!
The text was updated successfully, but these errors were encountered: