-
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
Can't reset and pass props to children scenes under Tab nav #2935
Comments
The way I've begun handling this personally is to use a After a login, I pop the user back to Launch.js which rechecks and then shunts to the authenticated view. This is helpful because even if the user somehow manages to "go back to the beginning" it just rechecks auth and sends them back to their view. LoginView is ONLY accessible if you are not authenticated. hope this helps |
@asciifaceman Thanks for the reply! I was using LoginScreen to simplified my example, is actually a loading screen that initialise the app. The approach you mentioned is a good solution, though I would prefer having the RESET functionality to work properly so I don't have to worry about it once the user got to HomeScreen. I've been looking around but it seems that the bug still exists in RESET and I haven't found a way to pass props from |
I also have this problem. Cant reset/replace to a tabs scene because the props are not passed to the children |
Please try to reproduce it with Example project and latest version 4.0.0-beta.40. Feel free to open if the issue still exists To 'reset' stack you can use |
Version
Tell us which versions you are using:
Expected behaviour
Above is the simplified version of my scenes.
Start at the LoginScreen, here is my goal:
1) Pass props (login stuff) from LoginScreen to HomeScreen
2) RESET the stack so the user can't go back to the Login screen once the user landed on HomeScreen
So I tried doing:
Attempt 1)
Actions.reset('HomeScreen', params);
I expected:
Attempt 2)
Actions.HomeScreen(params);
Attempt 3)
Actions.reset('Tab', params);
I expected:
Tab
but I expect/want a way to pass the props down to the children scenes underTab
.Actual behaviour
There is no route defined and it can only be ....
Steps to reproduce
For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.
The text was updated successfully, but these errors were encountered: