Skip to content

Commit 069f1d3

Browse files
committed
Document that native-stack now supports preload
1 parent 50dd512 commit 069f1d3

File tree

3 files changed

+4
-25
lines changed

3 files changed

+4
-25
lines changed

versioned_docs/version-7.x/navigation-actions.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,17 +1303,11 @@ export default function App() {
13031303
13041304
Preloading a screen means that the screen will be rendered in the background. All the components in the screen will be mounted and the `useEffect` hooks will be called. This can be useful when you want to improve the perceived performance by hiding the delay in mounting heavy components or loading data.
13051305
1306-
Depending on the navigator, `preload` may work slightly differently:
1306+
Depending on the navigator, `preload` may work differently:
13071307
1308-
- In a stack navigator ([stack](stack-navigator.md)), the screen will be rendered off-screen and animated in when you navigate to it. If [`getId`](screen.md#getid) is specified, it'll be used for the navigation to identify the preloaded screen.
1308+
- In a stack navigator ([stack](stack-navigator.md), [native stack](native-stack-navigator.md)), the screen will be rendered off-screen and animated in when you navigate to it. If [`getId`](screen.md#getid) is specified, it'll be used for the navigation to identify the preloaded screen.
13091309
- In a tab or drawer navigator ([bottom tabs](bottom-tab-navigator.md), [material top tabs](material-top-tab-navigator.md), [drawer](drawer-navigator.md), etc.), the existing screen will be rendered as if `lazy` was set to `false`. Calling `preload` on a screen that is already rendered will not have any effect.
13101310
1311-
:::warning
1312-
1313-
Preloading screens is currently not supported in the [native stack navigator](native-stack-navigator.md).
1314-
1315-
:::
1316-
13171311
When a screen is preloaded in a stack navigator, it will have a few limitations:
13181312
13191313
- It can't dispatch navigation actions (e.g. `navigate`, `goBack`, etc.).

versioned_docs/version-7.x/navigation-object.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -966,15 +966,9 @@ Preloading a screen means that the screen will be rendered in the background. Al
966966

967967
Depending on the navigator, `preload` may work slightly differently:
968968

969-
- In a stack navigator ([stack](stack-navigator.md)), the screen will be rendered off-screen and animated in when you navigate to it. If [`getId`](screen.md#getid) is specified, it'll be used for the navigation to identify the preloaded screen.
969+
- In a stack navigator ([stack](stack-navigator.md), [native stack](native-stack-navigator.md)), the screen will be rendered off-screen and animated in when you navigate to it. If [`getId`](screen.md#getid) is specified, it'll be used for the navigation to identify the preloaded screen.
970970
- In a tab or drawer navigator ([bottom tabs](bottom-tab-navigator.md), [material top tabs](material-top-tab-navigator.md), [drawer](drawer-navigator.md), etc.), the existing screen will be rendered as if `lazy` was set to `false`. Calling `preload` on a screen that is already rendered will not have any effect.
971971

972-
:::warning
973-
974-
Preloading screens is currently not supported in the [native stack navigator](native-stack-navigator.md).
975-
976-
:::
977-
978972
When a screen is preloaded in a stack navigator, it will have a few limitations:
979973

980974
- It can't dispatch navigation actions (e.g. `navigate`, `goBack`, etc.).

versioned_docs/version-7.x/upgrading-from-6.x.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -700,23 +700,14 @@ Or with a [group](group.md#screen-layout) or [navigator](navigator.md#screen-lay
700700

701701
### Preloading screens
702702

703-
Many navigators now support preloading screens prior to navigating to them. This can be useful to improve the perceived performance of the app by preloading the screens that the user is likely to navigate to next. Preloading a screen will render it off-screen and execute its side-effects such as data fetching.
703+
All built-in navigators now support preloading screens prior to navigating to them. This can be useful to improve the perceived performance of the app by preloading the screens that the user is likely to navigate to next. Preloading a screen will render it off-screen and execute its side-effects such as data fetching.
704704

705705
To preload a screen, you can use the `preload` method on the navigation object:
706706

707707
```js
708708
navigation.preload('Details', { id: 42 });
709709
```
710710

711-
Preloading is supported in the following navigators:
712-
713-
- Stack Navigator
714-
- Bottom Tab Navigator
715-
- Material Top Tab Navigator
716-
- Drawer Navigator
717-
718-
The Native Stack navigator doesn't currently support preloading screens.
719-
720711
See [`preload`](navigation-object.md#preload) for usage.
721712

722713
### Improvements to navigators

0 commit comments

Comments
 (0)