反应本机导航锁定用户交互

时间:2018-11-06 16:21:07

标签: react-native react-native-navigation wix-react-native-navigation

我正在使用RN 0.55和RNN 2.1.2。当我在堆栈导航器的根屏幕上并向右轻扫(向后操作),然后尝试通过推导航时,所有用户交互均被锁定,应用程序变得无响应。它不会崩溃,也不会引发错误。它只是锁定。有没有人经历过此事或已解决问题?

注意:.push被非常非常快速地两次调用的可能性很小。它不会被去抖,并且可以多次触发。

index.js中的初始设置

Navigation.events().registerAppLaunchedListener(() => {
  Navigation.setRoot({
    root: {
      stack: {
        children: [
          {
            component: {
              name: "search.ListsOfThings",
              options: {
                layout: {
                  orientation: ['portrait']
                },
                topBar: {
                  visible: false,
                  drawBehind: true
                }
              }
            }
          }
        ]
      }
    }
  })
})

ListOfThings内部的push命令

Navigation.push(this.props.componentId, {
            component: {
              name: 'search.FoundThings',
              passProps: {
                things: data.foundThings
              },
              options: {
                layout: {
                  orientation: ['portrait']
                },
                topBar: {
                  visible: false,
                  drawBehind: true
                }
              }
            }
          })

0 个答案:

没有答案