Skip to content

Commit 5463a50

Browse files
committed
Update upgrade duide
1 parent e457504 commit 5463a50

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

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

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,20 @@ React Navigation now requires newer versions of following libraries:
2828
- `react-native` >= 0.63.0
2929
- `expo` - 40+ (if you use Expo)
3030

31+
To upgrade `react-native-safe-area-context` and `react-native-screens` to the latest supported versions, do the following:
32+
33+
For Expo managed projects:
34+
35+
```sh
36+
expo install react-native-safe-area-context react-native-screens
37+
```
38+
39+
For bare React Native projects:
40+
41+
```sh npm2yarn
42+
npm install react-native-safe-area-context react-native-screens
43+
```
44+
3145
### Params are now overwritten on navigation instead of merging
3246

3347
This is probably one of the biggest changes. When navigating to an existing screen, we've merged the new params with the existing params since the first version of React Navigation.
@@ -301,7 +315,7 @@ The `@react-navigation/native-stack` package is back. We made few changes to the
301315
To install the 6.x version of `@react-navigation/native-stack`, run:
302316
303317
```sh npm2yarn
304-
npm install @react-navigation/native-stack react-native-screens react-native-safe-area-context
318+
npm install @react-navigation/native-stack
305319
```
306320
307321
### Breaking changes
@@ -396,7 +410,21 @@ The following changes are in the `@react-navigation/material-top-tabs` package.
396410
To install the 6.x version of `@react-navigation/material-top-tabs`, run:
397411
398412
```sh npm2yarn
399-
npm install @react-navigation/material-top-tabs react-native-pager-view
413+
npm install @react-navigation/material-top-tabs react-native-tab-view
414+
```
415+
416+
To upgrade `react-native-pager-view` to the latest supported version, do the following:
417+
418+
For Expo managed projects:
419+
420+
```sh
421+
expo install react-native-pager-view
422+
```
423+
424+
For bare React Native projects:
425+
426+
```sh npm2yarn
427+
npm install react-native-pager-view
400428
```
401429
402430
### It now uses `ViewPager` instead of Reanimated and Gesture Handler
@@ -449,7 +477,7 @@ The following changes are in the `@react-navigation/material-bottom-tabs` packag
449477
To install the 6.x version of `@react-navigation/material-bottom-tabs`, run:
450478
451479
```sh npm2yarn
452-
npm install @react-navigation/material-bottom-tabs react-native-safe-area-context
480+
npm install @react-navigation/material-bottom-tabs
453481
```
454482
455483
It's also necessary to install the `react-native-safe-area-context` package when using `@react-navigation/material-bottom-tab`, if you didn't have it already:
@@ -535,7 +563,7 @@ Similar to bottom tabs, drawer now uses `firstRoute` for the `backBehavior` prop
535563
We have a new package which contains various UI elements related to navigation, such as a `Header` component. This means that we can now use these components in all navigators. You can also install the library to import components such as `Header` to use in any navigator:
536564

537565
```sh npm2yarn
538-
npm install @react-navigation/elements react-native-safe-area-context
566+
npm install @react-navigation/elements
539567
```
540568

541569
Now you can import items from there:

0 commit comments

Comments
 (0)