Skip to content

Commit 9def7ac

Browse files
author
Aurore
committed
Update switch-navigator to explain the use case
1 parent 37ea16e commit 9def7ac

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/switch-navigator.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ title: createSwitchNavigator
44
sidebar_label: createSwitchNavigator
55
---
66

7+
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.
8+
This is the exact behavior that we want from the [authentication flow](/docs/auth-flow.md).
9+
10+
## API Definition
11+
712
```js
8-
createSwitchNavigator(RouteConfigs, SwitchNavigatorConfig)
13+
createSwitchNavigator(RouteConfigs, SwitchNavigatorConfig);
914
```
1015

1116
## RouteConfigs

0 commit comments

Comments
 (0)