android 我在启动屏幕后的导航中遇到了问题

r3i60tvu  于 2023-06-04  发布在  Android
关注(0)|答案(1)|浏览(190)

我尝试使用了一位开发人员https://www.npmjs.com/package/react-native-bootsplash建议的以下npm包,但当我构建项目时,我被困在启动屏幕上,我的项目无法进一步进行导航。
App.js文件

export const Navigation = () => {
  return (
    <SafeAreaProvider>
      <NavigationContainer onReady={() => RNBootSplash.hide(fade: true, duration: 500)}>
        <PrivateNavigation />
      </NavigationContainer>
    </SafeAreaProvider>
  );
};

私人导航代码:

export const PrivateNavigation = () => {
  return (
    <Stack.Navigator screenOptions={{headerShown: false}}>
      <Stack.Screen name="Home" component={HomeTabs} />
      <Stack.Screen name={routes.VENUE_PROFILE} component={VenueProfile} />
      <Stack.Screen name={routes.REVIEWS} component={Reviews} />
      <Stack.Screen name={routes.CUSTOM_TRIP} component={CustomTrip} />
      <Stack.Screen name={routes.TRIP_LOCATION} component={TripLocation} />
      <Stack.Screen name={routes.TRIP_DETAIL} component={TripDetails} />
      <Stack.Screen name={routes.NOTIFICATIONS} component={Notifications} />
      <Stack.Screen
        name={routes.ACCOUNT_SETTINGS}
        component={AccountSettings}
      />
    </Stack.Navigator>
balp4ylt

balp4ylt1#

<NavigationContainer onReady={() => RNBootSplash.hide({fade: true, duration: 500})}>

您的NavigationContainer组件的onReady属性中可能存在语法错误。

相关问题