Skip to content

Commit ff7dfc5

Browse files
committed
Fix tab view changes in upgrade guide
1 parent 009f923 commit ff7dfc5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ Previously, the UI elements in React Navigation such as the header on platforms
448448

449449
#### React Native Tab View now has a new API to specify various options
450450

451-
The API for the `TabBar` component in `react-native-tab-view` has been revamped. Previously, it took the following props:
451+
The API for the `TabView` and `TabBar` component in `react-native-tab-view` has been revamped. Previously, the `TabBar` took the following props:
452452

453453
- `getLabelText`
454454
- `getAccessible`
@@ -458,10 +458,10 @@ The API for the `TabBar` component in `react-native-tab-view` has been revamped.
458458
- `renderLabel`
459459
- `renderBadge`
460460

461-
These props have been replaced with `commonOptions` and `options` props:
461+
These props have been replaced with `commonOptions` and `options` props on `TabView`:
462462

463463
```js
464-
<TabBar
464+
<TabView
465465
commonOptions={{
466466
icon: ({ route, focused, color }) => (
467467
<Icon name={route.icon} color={color} />
@@ -478,6 +478,8 @@ These props have been replaced with `commonOptions` and `options` props:
478478
/>
479479
```
480480

481+
When using a custom tab bar, it will receive the `options` in the arguments.
482+
481483
The new API will make it easier for us to improve re-rendering performance of the tab bar items in the library.
482484

483485
See [React Native Tab View](tab-view.md#options) for usage.

0 commit comments

Comments
 (0)