Open tab or screen inside another NavigationContainer React Native

Tiempo de lectura: < 1 minuto

Reading time: < 1 minute

If you encounter the following error when opening a tab or screen within a NavigationContainer:

Looks like you have nested a 'NavigationContainer' inside another. Normally you need only one container at the root of the app, so this was probably an error. If this was intentional, pass 'independent={true}' explicitly. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them.

This error occurs when you have two nested NavigationContainers, and React doesn’t know which one to open. To resolve this, simply add the following property within your <NavigationContainer:

independent={true}

It should look like this:

<NavigationContainer independent={true} >

Leave a Comment