由于在ios模拟器上加载屏幕,Expo应用程序正在关闭
我正在使用expo开发一个应用程序。问题在于在ios emulator上加载屏幕。我想在加载状态为真时显示加载屏幕。它在android上运行良好,但在ios上,当加载为真时,应用程序会立即自动关闭,没有错误。代码如下所示由于在ios模拟器上加载屏幕,Expo应用程序正在关闭,ios,expo,Ios,Expo,我正在使用expo开发一个应用程序。问题在于在ios emulator上加载屏幕。我想在加载状态为真时显示加载屏幕。它在android上运行良好,但在ios上,当加载为真时,应用程序会立即自动关闭,没有错误。代码如下所示 return loading ? ( <Loading /> ) : ( <AppStack.Navigator headerMode="none"> {user ?
return loading ? (
<Loading />
) : (
<AppStack.Navigator headerMode="none">
{user ? (
<AppStack.Screen name="Home" component={HomeNavigator} />
) : (
<AppStack.Screen
name="Authentication"
component={AuthenticationNavigator}
/>
)}
</AppStack.Navigator>
);
返回加载?(
) : (
{用户(
) : (
)}
);
奇怪的是,当我像这样修改代码时,它在ios上也能正常工作
return (
<AppStack.Navigator headerMode="none">
{loading ? (
<AppStack.Screen name="Loading" component={Loading} />
) : user ? (
<AppStack.Screen name="Home" component={HomeNavigator} />
) : (
<AppStack.Screen
name="Authentication"
component={AuthenticationNavigator}
/>
)}
</AppStack.Navigator>
);
返回(
{加载(
):用户(
) : (
)}
);
我不明白为什么会这样。我很感激你的帮助。谢谢