Dynamically change Tab in Material Top Tab navigator

776 Views Asked by At

I have a bottom tab navigator with 2 Tabs. On 2nd Tab, I have a Material Top Tab navigator with 3 tabs.From Tab1's Screen of bottom Tab, I want to switch to 2nd Bottom Tab's Screen and also move to the 2nd Tab of Top Tab Navigator which is inside of 2nd Tab's Screen.

1

There are 1 best solutions below

2
John Ocean On

Well, you'd created material top tab navigator right? so just keep initialRouteName={2ndTopTabName} on <Tab.Navigator> then it'll works.

reference link: click here