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

Most upvoted comments

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 to unauthenticated.

The migration guide says

No component support for scene containers (that contains children Scene) - you have to use custom navigator.

What does that mean?