react-native-router-flux: Nested scenes not working in 4.0.0
I have the following structure
<Router>
<Scene key="root">
<Scene key="unauthenticated" type="reset">
<Scene key="intro" component={IntroScene} initial={true} />
</Scene>
<Scene key="authenticated" type="reset">
<Scene key="profile" component={ProfileScene} initial={true} />
</Scene>
</Scene>
</Router>
I have unauthenticated
and authenticated
scenes for sanity.
When I run Actions.authenticated()
from IntroScene
, I get an error saying:
There is no route defined for key authenticated must be one of 'intro'.
This worked previously, but I updated to ^4.0.0-beta.11
and it no longer works.
Do I need to flatten my scenes?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 24 (8 by maintainers)
Commits related to this issue
- * don't inherit type, navTransparent for scenes (#2066) * correctly display drawerImage for right drawer (#2087) * Fix error message — committed to aksonov/react-native-router-flux by deleted user 7 years ago
I think there is a bug. It works occasionally but every once in a while it throws the same error. I’m using
^4.0.0-beta.12
. I’ll try putting together some code to demonstrate.In my previous structure, it transitions correctly to
authenticated
but throws the same error when transitioning tounauthenticated
.The migration guide says
What does that mean?