Skip to content

Commit 3998967

Browse files
committed
Update instructions for upgrading to 6.x
1 parent e385d53 commit 3998967

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

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

+37-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ This guide lists all the changes that you need to keep in mind when upgrading.
1212

1313
These following changes are in the core library. You'll need to address this changes when upgrading the `@react-navigation/native` package.
1414

15+
To install the 6.x version of `@react-navigation/native`, run:
16+
17+
```sh npm2yarn
18+
npm install @react-navigation/native@next
19+
```
20+
1521
### Older versions of some libraries are no longer supported
1622

1723
React Navigation now requires newer versions of following libraries:
@@ -127,6 +133,12 @@ See [configuring links](configuring-links.md) for more details on configuring de
127133

128134
The following changes are in the `@react-navigation/stack` package.
129135

136+
To install the 6.x version of `@react-navigation/stack`, run:
137+
138+
```sh npm2yarn
139+
npm install @react-navigation/stack@next
140+
```
141+
130142
### New default animations for modal screens
131143

132144
To match the default behavior of iOS, now `mode="modal"` shows the new presentation style modal introduced in iOS 13. It also adjusts things like status bar height in the header automatically that you had to do manually before.
@@ -198,6 +210,12 @@ See [below](#elements-library) for more details on installing the elements libra
198210

199211
The following changes are in the `@react-navigation/bottom-tabs` package.
200212

213+
To install the 6.x version of `@react-navigation/bottom-tabs`, run:
214+
215+
```sh npm2yarn
216+
npm install @react-navigation/bottom-tabs@next
217+
```
218+
201219
### A header is shown by default in tab screens
202220

203221
Tab screens now show a header by default similar to screens in a stack navigator. This avoid the need for nesting a stack navigator in each screen just for a header. See [its options](bottom-tab-navigator.md#options) to see all header related options.
@@ -246,6 +264,12 @@ Returning to first route after pressing back seems more common in apps. To match
246264

247265
The following changes are in the `@react-navigation/material-top-tabs` package.
248266

267+
To install the 6.x version of `@react-navigation/material-top-tabs`, run:
268+
269+
```sh npm2yarn
270+
npm install @react-navigation/material-top-tabs@next
271+
```
272+
249273
### It now uses `ViewPager` instead of Reanimated and Gesture Handler
250274

251275
The `react-native-tab-view` dependency is upgraded to the latest version (3.x) which now uses [`ViewPager`](https://github.com/callstack/react-native-pager-view) instead of Reanimated and Gesture Handler. This will provide a native UX and also improve the performance.
@@ -293,6 +317,12 @@ Similar to bottom tabs, material top tabs now uses `firstRoute` for the `backBeh
293317

294318
The following changes are in the `@react-navigation/material-bottom-tabs` package.
295319

320+
To install the 6.x version of `@react-navigation/material-bottom-tabs`, run:
321+
322+
```sh npm2yarn
323+
npm install @react-navigation/material-bottom-tabs@next
324+
```
325+
296326
### The default value for `backBehavior` is now `firstRoute` for material bottom tabs
297327

298328
Similar to bottom tabs, material bottom tabs now uses `firstRoute` for the `backBehavior` prop as well.
@@ -301,6 +331,12 @@ Similar to bottom tabs, material bottom tabs now uses `firstRoute` for the `back
301331

302332
The following changes are in the `@react-navigation/drawer` package.
303333

334+
To install the 6.x version of `@react-navigation/drawer`, run:
335+
336+
```sh npm2yarn
337+
npm install @react-navigation/drawer@next
338+
```
339+
304340
### Drawer now uses Reanimated 2 if available
305341

306342
There is a new implementation based on the latest [Reanimated](https://docs.swmansion.com/react-native-reanimated/) which will be used if it's available, otherwise drawer will fallback to the old implementation.
@@ -366,7 +402,7 @@ Similar to bottom tabs, drawer now uses `firstRoute` for the `backBehavior` prop
366402

367403
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:
368404

369-
```sh
405+
```sh npm2yarn
370406
npm install @react-navigation/elements@next
371407
```
372408

0 commit comments

Comments
 (0)