使用抽屉类别在嵌套堆栈导航器中导航到嵌套堆栈的根屏幕

时间:2020-12-19 05:35:06

标签: react-native react-navigation-v5 react-navigation-drawer

我正在使用 React Navigation 5.x 开发 React Native。我试图在单击抽屉导航类别时导航到堆栈的根屏幕

enter image description here

(即)在单击左侧的抽屉类别时,我想导航回该特定堆栈的根屏幕

导航层次结构

  • 抽屉导航器
    • 堆栈导航器 1 - Home
      • 堆栈屏幕 1 - root
      • 堆栈屏幕 2
      • 状态画面 3
    • 堆栈导航器 1 - Product
      • 堆栈屏幕 1 - root
      • 堆栈屏幕 2
      • 状态画面 3

当我单击抽屉的产品类别时,无论我当前所在的屏幕如何,我都必须导航回该特定堆栈的根屏幕

0 个答案:

没有答案