我尝试使用了一位开发人员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>
1条答案
按热度按时间balp4ylt1#
您的
NavigationContainer
组件的onReady
属性中可能存在语法错误。