mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-13 09:39:18 +08:00
fix: make sure new state events are emitted when new navigators mount
This commit is contained in:
@@ -147,6 +147,10 @@ export default function SimpleStackScreen({
|
||||
[]
|
||||
);
|
||||
|
||||
if (state.isLoading) {
|
||||
return <SplashScreen />;
|
||||
}
|
||||
|
||||
return (
|
||||
<AuthContext.Provider value={authContext}>
|
||||
<SimpleStack.Navigator
|
||||
@@ -156,13 +160,7 @@ export default function SimpleStackScreen({
|
||||
),
|
||||
}}
|
||||
>
|
||||
{state.isLoading ? (
|
||||
<SimpleStack.Screen
|
||||
name="Splash"
|
||||
component={SplashScreen}
|
||||
options={{ title: 'Auth Flow' }}
|
||||
/>
|
||||
) : state.userToken === undefined ? (
|
||||
{state.userToken === undefined ? (
|
||||
<SimpleStack.Screen
|
||||
name="SignIn"
|
||||
options={{
|
||||
|
||||
Reference in New Issue
Block a user