You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: versioned_docs/version-6.x/upgrading-from-5.x.md
+37-1
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,12 @@ This guide lists all the changes that you need to keep in mind when upgrading.
12
12
13
13
These following changes are in the core library. You'll need to address this changes when upgrading the `@react-navigation/native` package.
14
14
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
+
15
21
### Older versions of some libraries are no longer supported
16
22
17
23
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
127
133
128
134
The following changes are in the `@react-navigation/stack` package.
129
135
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
+
130
142
### New default animations for modal screens
131
143
132
144
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
198
210
199
211
The following changes are in the `@react-navigation/bottom-tabs` package.
200
212
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
+
201
219
### A header is shown by default in tab screens
202
220
203
221
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
246
264
247
265
The following changes are in the `@react-navigation/material-top-tabs` package.
248
266
267
+
To install the 6.x version of `@react-navigation/material-top-tabs`, run:
### It now uses `ViewPager` instead of Reanimated and Gesture Handler
250
274
251
275
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
293
317
294
318
The following changes are in the `@react-navigation/material-bottom-tabs` package.
295
319
320
+
To install the 6.x version of `@react-navigation/material-bottom-tabs`, run:
### The default value for `backBehavior` is now `firstRoute` for material bottom tabs
297
327
298
328
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
301
331
302
332
The following changes are in the `@react-navigation/drawer` package.
303
333
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
+
304
340
### Drawer now uses Reanimated 2 if available
305
341
306
342
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
366
402
367
403
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:
0 commit comments