-
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
Error when changing scenes on login - There is no route defined for key #3059
Comments
Just encase anyone else was having the same issue I managed to resolve it by changing the structure of my scenes. This now works perfectly and can navigate between tabs and scenes with no issues.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
Tell us which versions you are using:
Expected behaviour
When the user logs into the application it changes the state of my application which should re-render and load a new scene.
Actual behaviour
When the user logs into the application it changes the state of my application however it does not re-render the scene and gives the below error:
Essentially there are 3 scenes that could be rendered -> Auth, Home, Profile. When the user first loads the app we check to see if there is a user, if not we set 'auth' to be true which renders the second else in _showHomeOrAuth(). If there is a user but they have not added a profile it will render profile. This all works with no issues.
When the user then logs in 'firebase.auth().onAuthStateChanged' is called and sets the 'home' state to true. What I am expecting is that this re-renders and the first if statement is called. (I can see it does go here as per the console.log) but then I get the above error.
Is there a reason it is still referencing 'codeValidation' since it doesn't go to that else on the re-render.
If I refresh my emulator everything loads as expected and the Home component is shown. The same issue occurs when I logout:
The reason I have separated it out also is because I don't want the 'auth, profile and home' to be part of the tabs and in my components it references firebase uid so when it renders the component on first load this also gives an error.
Is the structure completely wrong? I would appreciate any help with this as I've been going over it for so much time now.
The text was updated successfully, but these errors were encountered: