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

Fix for reset actions being unable to find nested scenes #2344

Closed
wants to merge 2 commits into from

Conversation

seratonik
Copy link

Found that when wrapping scenes in a Modal, Lightbox or Overlay that only the top level keys for those wrappers were available to perform a reset action to. The replace action wasn't sufficient as it still allowed swiping from the left to navigate back to the previous scene.

This PR fixes this issue and allows a reset to any key just like push, etc do.

However, I'm uncertain if this potentially breaks any other functionality - and it should definitely be reviewed thoroughly. Potentially fixes closed issue #2261 that was worked around.

@mcabs3
Copy link
Collaborator

mcabs3 commented Sep 6, 2017

@seratonik although this fixed resetting nested scenes, however this breaks resetting from a nested scene to another scene.

@seratonik
Copy link
Author

@mcabs3 shoot, I haven't experienced that yet in my project. I use the reset upon login, and cold-boots to send people to a tabbed area asynchronously, and then once again when they logout to go back to a guest experience and it seems okay right now.

@aksonov
Copy link
Owner

aksonov commented Sep 7, 2017

Yes, 'react-navigation' reset action is very weird. Sorry I cannot merge because we had this change before.

The correct way would be to write own processing within reducer to fit both cases (reseting from nested scene to another scene AND @seratonik's one ) ...

I have quite limited time now to do it, but it is already implemented for v3 version - you just need to convert it and put that logic to v4 Reducer

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

Successfully merging this pull request may close these issues.

3 participants