Skip to content

Commit 6006881

Browse files
authored
Merge pull request #328 from rgilbert1/patch-1
Improve documentation of `lazy` property on TabNavigatorConfig
2 parents 0574fb9 + 747190f commit 6006881

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

docs/bottom-tab-navigator.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ The route configs object is a mapping from route name to a route config, which t
2323
* `order` - Array of routeNames which defines the order of the tabs.
2424
* `paths` - Provide a mapping of routeName to path config, which overrides the paths set in the routeConfigs.
2525
* `backBehavior` - Should the back button cause a tab switch to the initial tab? If yes, set to `initialRoute`, otherwise `none`. Defaults to `initialRoute` behavior.
26+
* `lazy` - Defaults to `true`. If `false`, all tabs are rendered immediately. When `true`, tabs are rendered only when they are made active for the first time. Note: tabs are **not** re-rendered upon subsequent visits.
2627
* `tabBarComponent` - Optional, override component to use as the tab bar.
2728
* `tabBarOptions` - An object with the following properties:
2829
* `activeTintColor` - Label and icon color of the active tab.

docs/tab-navigator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The route configs object is a mapping from route name to a route config, which t
2020
* `tabBarPosition` - Position of the tab bar, can be `'top'` or `'bottom'`.
2121
* `swipeEnabled` - Whether to allow swiping between tabs.
2222
* `animationEnabled` - Whether to animate when changing tabs.
23-
* `lazy` - Defaults to `true`. If `false`, all tabs are rendered immediately. When `true`, tabs are rendered only when they are made active.
23+
* `lazy` - Defaults to `true`. If `false`, all tabs are rendered immediately. When `true`, tabs are rendered only when they are made active for the first time. Note: tabs are **not** re-rendered upon subsequent visits.
2424
* `removeClippedSubviews` - Defaults to `true`. An optimization to reduce memory usage by freeing resources used by inactive tabs.
2525
* `initialLayout` - Optional object containing the initial `height` and `width`, can be passed to prevent the one frame delay in [react-native-tab-view](https://github.com/react-native-community/react-native-tab-view#avoid-one-frame-delay) rendering.
2626
* `tabBarOptions` - Configure the tab bar, see below.

website/versioned_docs/version-3.x/bottom-tab-navigator.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ The route configs object is a mapping from route name to a route config, which t
2424
* `order` - Array of routeNames which defines the order of the tabs.
2525
* `paths` - Provide a mapping of routeName to path config, which overrides the paths set in the routeConfigs.
2626
* `backBehavior` - Should the back button cause a tab switch to the initial tab? If yes, set to `initialRoute`, otherwise `none`. Defaults to `initialRoute` behavior.
27+
* `lazy` - Defaults to `true`. If `false`, all tabs are rendered immediately. When `true`, tabs are rendered only when they are made active for the first time. Note: tabs are **not** re-rendered upon subsequent visits.
2728
* `tabBarComponent` - Optional, override component to use as the tab bar.
2829
* `tabBarOptions` - An object with the following properties:
2930
* `activeTintColor` - Label and icon color of the active tab.

0 commit comments

Comments
 (0)