0

How can I startTabBasedApp with focused specific tab. By default it opens first tab. But I want conditionally focus tab when I startTabBasedApp

rendom
  • 3,417
  • 6
  • 38
  • 49

2 Answers2

0
tabsStyle: { 
    initialTabIndex: 1, // optional, the default selected bottom tab. 
  }
rendom
  • 3,417
  • 6
  • 38
  • 49
0

Here's an example:

Navigation.startTabBasedApp({
     tabs: [
        {
            screen: "screen1",
            icon: require("../sharedAssets/image.png"),
            label: "label1",
        },
        {
            screen: "screen2"
            icon: require("../sharedAssets/image2.png"),
            label: "label2",
        }
    ],
    tabsStyle: {
        initialTabIndex: 1, // optional, the default selected bottom tab. Default: 0
    }
})
Itamar
  • 885
  • 1
  • 9
  • 17