Closed heron2014 closed 7 years ago
I'm happy to switch to ExNav if it's not going to eat up too much time. Do we have to do it now or can we wait and get some of the bigger hurdles out of the way first? Or is it better to do it early as it saves time later on?
Yes, this has to be done early. We are going to do that tomorrow! Shouldn't take too long.
Additional references about ex-navigation:
We tried to follow this method for resetting the navigation stack.
We ran into problems - immediatelyResetStack
was not a function of our mainNavigator
(returned from navigation.getNavigator('main')
.
Instead, we were able to access immediatelyResetStack
as follows, as suggested here:
navigation.performAction(({ tabs, stacks }) => {
tabs('main').jumpToTab('feed');
stacks('confirm').immediatelyResetStack([Router.getRoute('feed')], 0);
});
.jumpToTab('feed')
successfully redirects us to the feed page. We are not sure if the stack is clear or not at this point, nor how to check/inspect it.
@rickardinho
After research we have discovered that there is another navigation plugin (https://github.com/exponentjs/ex-navigation) which is recommended by a member of react-native team (see https://github.com/facebook/react-native/issues/6184#issuecomment-261744610). The benefits over react-native-router-flux are:
We feel it would be best to switch the navigation to ex-navigation. What your thoughts?