Skip to content

Commit ea35ccc

Browse files
committed
Fix auth flow snack links
1 parent 433977a commit ea35ccc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/auth-flow.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default createSwitchNavigator(
3535
}
3636
);
3737
```
38-
<a href="https://snack.expo.io/@react-navigation/auth-flow" target="blank" class="run-code-button">&rarr; Run this code</a>
38+
<a href="https://snack.expo.io/@react-navigation/auth-flow-v2" target="blank" class="run-code-button">&rarr; Run this code</a>
3939

4040
You may not be familiar with `SwitchNavigator` yet. The purpose of `SwitchNavigator` is to only ever show one screen at a time. By default, it does not handle back actions and it resets routes to their default state when you switch away. This is the exact behavior that we want from the authentication flow: when users sign in, we want to throw away the state of the authentication flow and unmount all of the screens, and when we press the hardware back button we expect to not be able to go back to the authentication flow. We switch between routes in the `SwitchNavigator` by using the `navigate` action. You can read more about the `SwitchNavigator` in the [API reference](switch-navigator.html).
4141

@@ -79,7 +79,7 @@ class AuthLoadingScreen extends React.Component {
7979
}
8080
}
8181
```
82-
<a href="https://snack.expo.io/@react-navigation/auth-flow" target="blank" class="run-code-button">&rarr; Run this code</a>
82+
<a href="https://snack.expo.io/@react-navigation/auth-flow-v2" target="blank" class="run-code-button">&rarr; Run this code</a>
8383

8484
## Fill in other components
8585

@@ -131,6 +131,6 @@ class HomeScreen extends React.Component {
131131

132132
// More code like OtherScreen omitted for brevity
133133
```
134-
<a href="https://snack.expo.io/@react-navigation/auth-flow" target="blank" class="run-code-button">&rarr; Run this code</a>
134+
<a href="https://snack.expo.io/@react-navigation/auth-flow-v2" target="blank" class="run-code-button">&rarr; Run this code</a>
135135

136-
That's about all there is to it. At the moment, `SwitchNavigator` doesn't support animating between screens. Let us know if this is important to you [on Canny](https://react-navigation.canny.io/feature-requests).
136+
That's about all there is to it. At the moment, `createSwitchNavigator` doesn't support animating between screens. Let us know if this is important to you [on Canny](https://react-navigation.canny.io/feature-requests).

0 commit comments

Comments
 (0)