Replies: 3 comments
-
I observed that the problem goes away if I remove these lines from the useEffect(() => {
const unsubscribe = navigation.addListener('transitionEnd', () => {
navigation.setParams({
animation: true,
});
});
return unsubscribe;
}, [navigation]); It seems that the call to |
Beta Was this translation helpful? Give feedback.
0 replies
-
If I replace navigation.dispatch({
...CommonActions.setParams({
screen: 'ScreenWithTabs',
params: {animation: true},
}),
}); things work. I wonder if |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have the same issue, but it's only happening on Android for some reason. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a material top tabs navigator nested inside one of the screen of a stack navigator. When I navigate away from the top tabs screen the nested navigator resets its state, even though it's still on the stack of the stack navigator. This causes the
goBack()
call on the next screen to go back to the tabs screen with the first tab selected, instead of whatever tab was selected when we navigated. Using the Flipper plugin I verified this by looking at theindex
state kept for the nested navigator.Before navigation state:
After navigation state:
Observe how the
index
of the nested navigator got reset by pushing another screen onto the stack.How can I avoid the nested navigator state getting reset?
Beta Was this translation helpful? Give feedback.
All reactions