- What code are you running and what is happening?
I have made a small example to reproduce the issue:
I have nested navigators (here 2 top tab bar but I also reproduce the issue with one bottom and one top tab bar)
And I want to add a bottom sheet modal (see https://github.com/gorhom/react-native-bottom-sheet)
When I navigate between sub tabs (2.1 and 2.2) the following error is displayed
Accessing the 'state' property of the 'route' object is not supported. If you want to get the focused route name, use the 'getFocusedRouteNameFromRoute' helper instead: https://reactnavigation.org/docs/screen-options-resolution/#setting-parent-screen-options-based-on-child-navigators-state
Whereas I do not access directly to the state of the route
- Include a screenshot or video if it makes sense.
What do you expect should be happening?
The same behavior without warning
Include a screenshot or video if it makes sense.
How to reproduce
run this example app on android (didn’t try on iOS)
and then navigate to TAB 2.2 then 2.1 then 2.2
|iOS or Android||Android|
|expo||40.0.1 (I use expo – I had to eject due to #7981 (comment) – in the example but I encounter the same issue without expo)|
|npm or yarn||yarn|