IjzerenHein / IjzerenHein/react-navigation-shared-element
[v5] bottomTabNavigator: on tabPress -> sharedElementStackNavigator doesn‘t navigate to initialRoute
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
I nested my _SharedElementStackNavigator_ in a _BottomTabNavigator_. If I click on the corresponding Icon in the _BottomTabNavigator_ the _TabNavigator_ navigates to the _SharedElementStackNavigator_ (if it isn't already open), but the _popToTop_ action of the _SharedElementStackNavigator_ isn't fired. If I replace the _createSharedElementStackNavigator_ with the normal _createStackNavigator_ everything works fine, but, of course, the Animation is lost.
So I have the problem, that I don't get navigated to the initialRoute of the _SharedElementStackNavigator_, if I press on the corresponding Icon in the TabBar, although that's normally standard.
Im am using the v5-navigation.
How do I solve this issue? Or is a fix planned?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the nested SharedElementStackNavigator inside a BottomTabNavigator with React Navigation v5, then compare tab-press behavior with a normal stack navigator. Done means pressing the corresponding tab navigates to the stack's initial route by triggering the expected popToTop behavior without losing the shared-element animation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100