Skip to content
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

Using different navigation solution #19

Closed
heron2014 opened this issue Dec 5, 2016 · 4 comments
Closed

Using different navigation solution #19

heron2014 opened this issue Dec 5, 2016 · 4 comments

Comments

@heron2014
Copy link
Contributor

heron2014 commented Dec 5, 2016

@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 facebook/react-native#6184 (comment)). The benefits over react-native-router-flux are:

We feel it would be best to switch the navigation to ex-navigation. What your thoughts?

@heron2014 heron2014 added this to the Set up milestone Dec 5, 2016
@rickardinho
Copy link
Collaborator

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?

@heron2014
Copy link
Contributor Author

Yes, this has to be done early. We are going to do that tomorrow! Shouldn't take too long.

@heron2014
Copy link
Contributor Author

Additional references about ex-navigation:

@heron2014
Copy link
Contributor Author

heron2014 commented Dec 7, 2016

Redirecting and resetting navigation stack

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants