如何使用wix的react-native-navigation popTo()?

时间:2019-09-01 22:53:24

标签: react-native react-native-android react-native-ios react-native-navigation

如何从wix的导航库中实现popTo(componentId)方法?

我尝试过:

testFunc = () => {
    Navigation.popTo({
      screen: "TestScreen"
    });
  };

和:

testFunc = () => {
    Navigation.popTo({
      component: {
        name: "TestScreen"
      }
    });
  };

均无效。 github或SO上的wix文档中没有记录的示例

1 个答案:

答案 0 :(得分:1)

根据documentation,命令为 Navigation.popTo(componentId);

您可以尝试吗

testFunc = () => {
    Navigation.popTo("TestScreen");
  };