-
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
Actions.reset: There is no route defined for Key X #3194
Comments
when I use "Action.reset("xxx")",it will show |
Same here.
Under 4.0.0-beta.31 has no problem. Here is my hierarchy and error message
And I called
It looks doesn't recognize child s more then 2 depth |
I create a minimal project to reproduce this bug. I found using LightBox + ActionType.RESET => this combination makes problem. |
Nice, thanks, I'll take a look when possible and update the ticket. |
Also guys, there a couple of things here that I noticed that are not supported anymore - due
I am checking the provided code now to see what is happening. |
I found that the problem is not actually the combination between What is going on - is that |
Hey guys - I was able to fix the issue - just being sure that is not going to break anything else before creating a PR for it. Just to be clear about the fixes I am going to push:
Thank you for the patience and for keeping the discussion clear and objective here. |
I installed the latest package today "react-native-router-flux": "^4.0.1" but i don't find the above fix. |
@Kiran0791 |
This should do the trick:
|
@daviscabral I installed |
Even after this reset not working. Its says There is no route defined for key signup. |
Did you solve this problem in version 4.0.5? I still had this problem in version 4.0.5 |
Please try replace action
… On 8 Oct 2018, at 12:09, 阿斯顿 ***@***.***> wrote:
Did you solve this problem in version 4.0.5? I still had this problem in version 4.0.5
Error: There is no route defined for key main.
Must be one of: 'root','confirmDialog'
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@aksonov Replace 'reset' with 'replace'? |
Yes, use type=replace for routes you want to use instead current one
…On Monday, October 8, 2018, 阿斯顿 ***@***.***> wrote:
@aksonov <https://github.com/aksonov> Replace 'reset' with 'replace'?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3194 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQpcYT_GXk3n72VK5imxRnVxxT54Paiks5uiyU7gaJpZM4WFDKH>
.
|
@aksonov I have the same problem when i update my version to 4.0.5, for some reason i have to use 'reset' instead of 'replace'. What can i do? |
I find a way to avoid this problem by add a new scene 'Route' in the first place of 'Pages'.
then I can use Actions.reset('Login') or Actions.reset('Main') normally. I hope this can help |
@hsynlove the 'Root' is empty page? |
@asd8855 yes, and this page can resolve this problem though it doesn't look elegant. |
Hi, 'replace' is not the same with 'reset' because we need to make sure that no history is tracked anymore (with back buttons, etc.) when the user logs out. @aksonov Do you think this can be solved in a clean way? Thanks! |
facing the same issue here. reset not working for nested scenes with lightbox. |
@aksonov Hi, we are still experiencing the same issue in latest version. |
@aksonov same here. Just upgrade from beta to 4.0.6 and push is not working |
same here. Reset is not working and sometimes weirdly push too is not working |
yes, reset not working for nested scenes with lightbox. |
Hi @aksonov , Trying to update Still facing this issue. If I use REPLACE instead of RESET I am not getting any issue. But the app is not behaving in expected behavior. |
Not working on
Until this resolves, downgraded back to |
@aksonov can you please reopen the issue? |
Same as @malithjkmt this still not working
any work around that doesn't affect the app behaviour (type="replace") ? |
same error, "react-native-router-flux": "^4.2.0", |
still error, "react-native-router-flux": "4.2.0". "react-native": "0.60.4" |
Action.reset("key") the problem is fixed for me |
I also have the same problem with "react-native-router-flux": "^4.2.0". |
I also face the same problem. When I add type='reset' to scene it works ok when connected to metro. But when creating build it shows error on alert that There is not route defined for Key x. |
After 2 years, upgraded to |
How is this closed? |
@telmen , I resolved this issue by resetting to Modal parent element, plus I also set initialScreen props. So, for example when you logout. Just run Actions.reset('modal'), and inside of Modal set the initialScreen. |
@yestay90 hi, i can't seem to find |
@telmen , sorry it is just |
@yestay90 no problem, dude. But how do I reset the current stack and not use a modal scene but a plain scene from the root stack? |
@telmen , you get this error only when you have or which wraps you stacks. So In my case, I could only reset whether to LightBox or to Modal cause they are on top of stack. |
Decided not to use Modal :). Thank you. |
Version
EDIT done by @daviscabral
Steps to reproduce
The text was updated successfully, but these errors were encountered: