当我导航到新屏幕时,它会附加到同一屏幕,就像这样。网页上的反应导航 v6
它出什么问题了?
代码在那里,不能在那个帖子上发布代码。出错了
https://github.com/react-navigation/react-navigation/discussions/10128
当我导航到新屏幕时,它会附加到同一屏幕,就像这样。网页上的反应导航 v6
它出什么问题了?
代码在那里,不能在那个帖子上发布代码。出错了
https://github.com/react-navigation/react-navigation/discussions/10128
您的<Home/>
路线位于“/”路径,其他所有路径(/about、/details...)都将匹配“/”路径。
<Home/>
在您访问的每个其他页面上。您可以尝试通过EXACT道具:
<Sky.Screen
exact
key={index}
name={route.name}
component={route.screen}
initialParams={route.initialParams}
options={route.options}
/>
然后,反应路由器,而不是检查componentCnfiguredPath.includes(currentPath) ? <ComponentConfigured/> : null
将检查是否componentCnfiguredPath====currentPath ? <ComponentConfigured/> : null