带有有效载荷{"name": "Home"}的动作 "NAVIGATE "没有被任何导航仪处理。

问题描述 投票:0回答:1

当前行为获取错误

react native中的Private Route在页面变化时无法使用。任何导航器都无法处理带有有效载荷{"name": "Home"}的动作'NAVIGATE'。

如果您试图导航到嵌套导航器中的一个屏幕,请参见 https:/reactnavigation.orgdocsnesting-navigators#navigating-to-a-screen-in-nested-navigator.

这是一个仅用于开发的警告,不会在生产中显示。

Error message预期行为无法使用Auth流导航。

如何重现使用的代码来自.NET Framework 2.0。https:/reactnavigation.orgdocsauth-flow。

<NavigationContainer>
        <Stack.Navigator
          screenOptions={{
            headerShown: false,
          }}>
           {isSignedIn === "true"? ( 
            <> 
            <Stack.Screen name="Home" component={Home} />
            <Stack.Screen name="Bookorder" component={Bookorder} />
             </> 
           ) : (
            <>
            <Stack.Screen name="Login" component={Login} />
            </>
          )}
        </Stack.Navigator>
  </NavigationContainer>

环境系统:OS: macOS 10.15.4CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHzMemory: 46.17 MB 8.00GBShell: 3.2.57 - binbashBinaries:Node: 13.12.0 - usrlocalbinnodeYarn: Not Foundnpm: 6.14.4 - usrlocalbinnpmWatchman: 4.9.0 - usrlocalbinwatchman.

react-native react-navigation react-navigation-stack
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.