File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
versioned_docs/version-7.x Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -83,13 +83,13 @@ const RootStack = createNativeStackNavigator({
8383 },
8484 },
8585});
86- // codeblock-focus-end
8786
8887const Navigation = createStaticNavigation (RootStack);
8988
9089export default function App () {
9190 return < Navigation / > ;
9291}
92+ // codeblock-focus-end
9393
9494function HomeScreen () {
9595 return < View / > ;
@@ -124,35 +124,38 @@ import { createNativeStackNavigator } from '@react-navigation/native-stack';
124124
125125const Stack = createNativeStackNavigator ();
126126
127- const getIsSignedIn = () => {
128- // custom logic
127+ const useIsSignedIn = () => {
129128 return true ;
130129};
131130
131+ const useIsSignedOut = () => {
132+ return false ;
133+ };
134+
135+ // codeblock-focus-start
132136export default function App () {
133- const isSignedIn = getIsSignedIn ();
137+ const isSignedIn = useIsSignedIn ();
134138
135139 return (
136140 < NavigationContainer>
137141 < Stack .Navigator >
138- // codeblock-focus-start
139142 {isSignedIn ? (
140- <>
143+ < Stack . Group >
141144 < Stack .Screen name= " Home" component= {HomeScreen} / >
142145 < Stack .Screen name= " Profile" component= {ProfileScreen} / >
143146 < Stack .Screen name= " Settings" component= {SettingsScreen} / >
144- < / >
147+ < / Stack . Group >
145148 ) : (
146- <>
149+ < Stack . Group >
147150 < Stack .Screen name= " SignIn" component= {SignInScreen} / >
148151 < Stack .Screen name= " SignUp" component= {SignUpScreen} / >
149- < / >
152+ < / Stack . Group >
150153 )}
151- // codeblock-focus-end
152154 < / Stack .Navigator >
153155 < / NavigationContainer>
154156 );
155157}
158+ // codeblock-focus-end
156159
157160function HomeScreen () {
158161 return < View / > ;
You can’t perform that action at this time.
0 commit comments