Skip to content

Commit 1cb6653

Browse files
committed
Update upgrade guide
1 parent 792efa4 commit 1cb6653

File tree

2 files changed

+133
-13
lines changed

2 files changed

+133
-13
lines changed

versioned_docs/version-7.x/getting-started.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Here are some resources to help you out:
1919

2020
## Minimum requirements
2121

22-
- `react-native` >= 0.63.0
23-
- `expo` >= 41 (if you use [Expo](https://expo.io))
24-
- `typescript` >= 4.1.0 (if you use [TypeScript](https://www.typescriptlang.org))
22+
- `react-native` >= 0.72.0
23+
- `expo` >= 49 (if you use Expo)
24+
- `typescript` >= 5.0.0 (if you use TypeScript)
2525

2626
## Installation
2727

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

+130-10
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ This guides lists all the breaking changes and new features in React Navigation
1010

1111
## Minimum Requirements
1212

13-
TODO
13+
- `react-native` >= 0.72.0
14+
- `expo` >= 49 (if you use Expo)
15+
- `typescript` >= 5.0.0 (if you use TypeScript)
1416

1517
## Breaking changes
1618

@@ -26,9 +28,7 @@ Due to these issues, we have a special API to navigate to a nested screen (`navi
2628
From these release, this is no longer the default behavior. If you're relying on this behavior in your app, you can pass the `navigationInChildEnabled` prop to `NavigationContainer` to keep the behavior until you are able to migrate:
2729

2830
```js
29-
<NavigationContainer navigationInChildEnabled>
30-
{/* ... */}
31-
</NavigationContainer>
31+
<NavigationContainer navigationInChildEnabled>{/* ... */}</NavigationContainer>
3232
```
3333

3434
The `navigationInChildEnabled` prop will be removed in the next major.
@@ -116,6 +116,23 @@ So we've removed this prop instead of a `NavigationIndependentTree` component wh
116116
117117
This way, the responsibility no longer lies on the miniapp developer, but on the parent app. It's also harder for beginners to accidentally add this.
118118

119+
### The `theme` prop now accepts a `fonts` property
120+
121+
Previously, the `theme` prop on `NavigationContainer` accepted a `colors` property to customize the colors used by various UI elements from React Navigation. We have now added a `fonts` property to customize the fonts as well. If you are passing a custom theme in the `theme` prop, you'll need to update it to include the `fonts` property.
122+
123+
```diff
124+
import { DefaultTheme } from '@react-navigation/native';
125+
126+
const theme = {
127+
colors: {
128+
// ...
129+
},
130+
+ fonts: DefaultTheme.fonts,
131+
};
132+
```
133+
134+
If you want to customize the fonts, see [the themes guide](themes.md) for more details.
135+
119136
### The `Link` component and `useLinkProps` hook now use screen names instead of paths
120137
121138
Previously, the `Link` component and `useLinkProps` hook were designed to work with path strings via the `to` prop. But it had few issues:
@@ -152,6 +169,83 @@ const action = buildAction('/details?foo=42'); // { type: 'NAVIGATE', payload: {
152169
153170
Note that this hook is intended to be used by custom navigators and not by end users. For end users, the `Link` component and `useLinkProps` are the recommended way to navigate.
154171
172+
### The flipper devtools plugin is now removed
173+
174+
Previously, we added a Flipper plugin for React Navigation to make debugging navigation easier. However, it has added significant maintenance overhead for us. The Flipper team hasn't been focused on React Native recently, so the overall experience of using Flipper with React Native has been poor.
175+
176+
> Currently, the Flipper team has been focused on native developer experience, so we are going back to the drawing board. We have created a new pillar within our team focused on Developer Experience. We are currently investigating improved Chrome Debugger protocol support from the Hermes team as well as migrating the debugging experience from Flipper to Chrome DevTools so we can deliver a debugging experience that meets our standard.
177+
>
178+
> [react-native-community/discussions-and-proposals#546 (comment)](https://github.com/react-native-community/discussions-and-proposals/discussions/546#discussioncomment-4178951)
179+
180+
Since the React Native team migrating away from Flipper, it doesn't make much sense for us to spend additional resources to keep supporting it. So we've removed the Flipper plugin from `@react-navigation/devtools`.
181+
182+
### Various deprecated APIs are removed
183+
184+
We have removed all of the previously deprecated APIs. These APIs were deprecated in React Navigation 6 and showed a warning when used. So make sure that you have addressed all the warnings before upgrading.
185+
186+
Here is the full list of removed APIs:
187+
188+
- `@react-navigation/stack`
189+
- Removed `mode` prop - use `presentation` option instead
190+
- Removed `headerMode` prop - use `headerMode` and `headerShown` options instead
191+
- Removed `keyboardHandlingEnabled` prop - use `keyboardHandlingEnabled` option instead
192+
- `@react-navigation/drawer`
193+
- Removed `openByDefault` prop - use `defaultStatus` prop instead
194+
- Removed `lazy` prop - use `lazy` option instead
195+
- Removed `drawerContentOptions` prop which contained following options:
196+
- `drawerPosition` - use `drawerPosition` option instead
197+
- `drawerType` - use `drawerType` option instead
198+
- `edgeWidth` - use `swipeEdgeWidth` option instead
199+
- `hideStatusBar` - use `drawerHideStatusBarOnOpen` option instead
200+
- `keyboardDismissMode` - use `keyboardDismissMode` option instead
201+
- `minSwipeDistance` - use `swipeMinDistance` option instead
202+
- `overlayColor` - use `overlayColor` option instead
203+
- `statusBarAnimation` - use `drawerStatusBarAnimation` option instead
204+
- `gestureHandlerProps` - use `gestureHandlerProps` option instead
205+
- `@react-navigation/bottom-tabs`
206+
- Removed `lazy` prop - use `lazy` option instead
207+
- Removed `tabBarOptions` prop which contained following options:
208+
- `keyboardHidesTabBar` - use `tabBarHideOnKeyboard` option instead
209+
- `activeTintColor` - use `tabBarActiveTintColor` option instead
210+
- `inactiveTintColor` - use `tabBarInactiveTintColor` option instead
211+
- `activeBackgroundColor` - use `tabBarActiveBackgroundColor` option instead
212+
- `inactiveBackgroundColor` - use `tabBarInactiveBackgroundColor` option instead
213+
- `allowFontScaling` - use `tabBarAllowFontScaling` option instead
214+
- `showLabel` - use `tabBarShowLabel` option instead
215+
- `labelStyle` - use `tabBarLabelStyle` option instead
216+
- `iconStyle` - use `tabBarIconStyle` option instead
217+
- `tabStyle` - use `tabBarItemStyle` option instead
218+
- `labelPosition` and `adapative` - use `tabBarLabelPosition` option instead
219+
- `tabBarVisible` - use `display: 'none'` `tabBarStyle` option instead
220+
- `@react-navigation/material-top-tabs`
221+
- Removed `swipeEnabled` prop - use `swipeEnabled` option instead
222+
- Removed `lazy` prop - use `lazy` option instead
223+
- Removed `lazyPlaceholder` prop - use `lazyPlaceholder` option instead
224+
- Removed `lazyPreloadDistance` prop - use `lazyPreloadDistance` option instead
225+
- Removed `tabBarOptions` prop which contained following options:
226+
- `renderBadge` - use `tabBarBadge` option instead
227+
- `renderIndicator` - use `tabBarIndicator` option instead
228+
- `activeTintColor` - use `tabBarActiveTintColor` option instead
229+
- `inactiveTintColor` - use `tabBarInactiveTintColor` option instead
230+
- `pressColor` - use `tabBarPressColor` option instead
231+
- `pressOpacity` - use `tabBarPressOpacity` option instead
232+
- `showLabel` - use `tabBarShowLabel` option instead
233+
- `showIcon` - use `tabBarShowIcon` option instead
234+
- `allowFontScaling` - use `tabBarAllowFontScaling` option instead
235+
- `bounces` - use `tabBarBounces` option instead
236+
- `scrollEnabled` - use `tabBarScrollEnabled` option instead
237+
- `iconStyle` - use `tabBarIconStyle` option instead
238+
- `labelStyle` - use `tabBarLabelStyle` option instead
239+
- `tabStyle` - use `tabBarItemStyle` option instead
240+
- `indicatorStyle` - use `tabBarIndicatorStyle` option instead
241+
- `indicatorContainerStyle` - use `tabBarIndicatorContainerStyle` option instead
242+
- `contentContainerStyle` - use `tabBarContentContainerStyle` option instead
243+
- `style` - use `tabBarStyle` option instead
244+
245+
### `customAnimationOnGesture` is renamed to `animationMatchesGesture` in Native Stack Navigator
246+
247+
TODO
248+
155249
### Material Top Tab Navigator no longers requires installing `react-native-tab-view`
156250

157251
Previously, `@react-navigation/material-top-tabs` required installing `react-native-tab-view` as a dependency in the project. We have now moved this package to the React Navigation monorepo and able to coordinate the releases together, so it's no longer necessary to install it separately.
@@ -171,22 +265,48 @@ If you are using `@react-navigation/material-bottom-tabs` in your project, you c
171265
+ import { createMaterialBottomTabNavigator } from 'react-native-paper/react-navigation';
172266
```
173267
174-
### The flipper devtools plugin is now removed
268+
### The `tabBarTestID` option is renamed to `tabBarButtonTestID` in Bottom Tab Navigator
175269
176-
Previously, we added a Flipper plugin for React Navigation to make debugging navigation easier. However, it has added significant maintenance overhead for us. The Flipper team hasn't been focused on React Native recently, so the overall experience of using Flipper with React Native has been poor.
270+
TODO
177271
178-
> Currently, the Flipper team has been focused on native developer experience, so we are going back to the drawing board. We have created a new pillar within our team focused on Developer Experience. We are currently investigating improved Chrome Debugger protocol support from the Hermes team as well as migrating the debugging experience from Flipper to Chrome DevTools so we can deliver a debugging experience that meets our standard.
179-
>
180-
> [react-native-community/discussions-and-proposals#546 (comment)](https://github.com/react-native-community/discussions-and-proposals/discussions/546#discussioncomment-4178951)
272+
### Drawer Navigator no longer supports Reanimated 1
181273
182-
Since the React Native team migrating away from Flipper, it doesn't make much sense for us to spend additional resources to keep supporting it. So we've removed the Flipper plugin from `@react-navigation/devtools`.
274+
TODO
183275
184276
## New features
185277
186278
### Navigators now support a static configuration API
187279
188280
TODO
189281
282+
### Support a top-level `path` configuration in linking config
283+
284+
TODO
285+
286+
### Support custom `layout` prop for Navigators
287+
288+
TODO
289+
290+
### Add experimental API for handling deep link after authentication
291+
292+
TODO
293+
294+
### Add a `Button` component to Elements
295+
296+
TODO
297+
298+
### Add `useAnimatedHeaderHeight` hook to Native Stack Navigator
299+
300+
TODO
301+
302+
### Bottom Tab Navigator now supports animations
303+
304+
TODO
305+
306+
### Bottom Tab Navigator can now show tabs on the side
307+
308+
TODO
309+
190310
### The drawer implementation is now available in `react-native-drawer-layout` as a standalone package
191311
192312
TODO

0 commit comments

Comments
 (0)