📌  相关文章
📜  将导航重置为特定选项卡 react-navigation - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:50.458000             🧑  作者: Mango

代码示例1
navigation.reset({
  index: 1,
  routes: [
    {
      name: 'Screen1',
      state: {
        routes: [{ name: 'Tab2' }],
      },
    },
    {
      name: 'Screen1',
      state: {
        routes: [
          {
            name: 'Tab2',
            state: {
              routes: [{ name: 'Screen5' }, { name: 'Screen4' }]
            },
          },
        ],
      },
    },
  ],
})