Closed eduedix closed 7 years ago
+1. I have the same issue. I noticed that ActionTypes.JUMP_TO_TAB
is dispatched, however
ActionTypes.SET_CURRENT_NAVIGATOR
is not
In some cases I did a workaround with
this.props.navigation.performAction(({ tabs }) => {
tabs('root').jumpToTab('tab1');
});
But If I want to call this method from anywhere outside of react component, it doesn't seem to be working. To me, it looks a like a bug
@mantas-janulionis
this worked:
store.dispatch(NavigationActions.jumpToTab('root', {key: 'tab1'}))
i think a documentation update is necessary.
@eduedix Solved my issue as well! Seems this PR has the updates needed for the documentation: https://github.com/exponent/ex-navigation/pull/359
@mikemurray thanks for the link 👍
I'm getting a Navigator does not exist
error even if I'm trying to call it from a component. Is there an example implementation of tabs('root').jumpToTab('tab1');
this.props.navigation.performAction(({ tabs }) => {
tabs('root').jumpToTab('tab1');
});
@mypark Is the navigatorUID
called root
in the element TabNavigation
?
That's was the issue thanks. I was only setting Id
I want to call jumpToTab action in a redux middleware. I would be grateful if you gave me a hand to resolve this. My TabNavigation is
root
and i want to jump to Tabtab1
. I have tried this without success:store.dispatch(NavigationActions.jumpToTab('root', 'tab1'))
Any idea on how to jumpToTab using NavigationActions?