Skip to content

Commit d535cfa

Browse files
committed
Document sceneContainerStyle removal
1 parent 5782814 commit d535cfa

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,19 @@ The `tabBarTestID` option in `@react-navigation/bottom-tabs` and `@react-navigat
338338

339339
See [Bottom Tab Navigator](bottom-tab-navigator.md#tabbarbuttontestid) and [Material Top Tab Navigator](material-top-tab-navigator.md#tabbarbuttontestid) docs for usage.
340340

341+
### The `sceneContainerStyle` prop and option are removed from Bottom Tab Navigator, Material Top Tab Navigator and Drawer Navigator in favor of `sceneStyle`
342+
343+
Previously, the Bottom Tab Navigator and Material Top Tab Navigator accepted a `sceneContainerStyle` prop to style the container of the scene. This was inflexible as it didn't allow different styles for different screens. Now, the `sceneStyle` option is added to these navigators to style individual screens.
344+
345+
Similarly, the `sceneContainerStyle` option in Drawer Navigator is renamed to `sceneStyle` for consistency.
346+
347+
If you are using `sceneContainerStyle` prop, you can pass `sceneStyle` in `screenOptions` instead to keep the same behavior:
348+
349+
```diff lang=js
350+
- <Tab.Navigator sceneContainerStyle={{ backgroundColor: 'white' }}>
351+
+ <Tab.Navigator screenOptions={{ sceneStyle: { backgroundColor: 'white' } }}>
352+
```
353+
341354
#### Drawer Navigator now requires Reanimated 2 or 3 on native platforms
342355

343356
Previously, `@react-navigation/drawer` supported both Reanimated 1 and Reanimated 2 APIs with the `useLegacyImplementation` option. This is now no longer supported and the `useLegacyImplementation` option is removed.

0 commit comments

Comments
 (0)