Skip to content

Commit 44176dd

Browse files
committed
docs: add freezeOnBlur documentation
1 parent c9f13ad commit 44176dd

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/docs/docs/guides/standalone-usage.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ Each route in the `routes` array can have the following properties:
184184
- `badge`: Badge text to display on the tab
185185
- `activeTintColor`: Custom active tint color for this specific tab
186186
- `lazy`: Whether to lazy load this tab's content
187+
- `freezeOnBlur`: Whether to freeze this tab's content when it's not visible
187188

188189
### Helper Props
189190

@@ -224,3 +225,8 @@ Function to determine if a tab should be hidden.
224225

225226
Function to get the test ID for a tab item.
226227
- Default: Uses `route.testID`
228+
229+
#### `getFreezeOnBlur`
230+
231+
Function to determine if a screen should be frozen on blur.
232+
- Default: Uses `route.freezeOnBlur`

docs/docs/docs/guides/usage-with-react-navigation.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,12 @@ Whether this screens should render the first time it's accessed. Defaults to tru
233233

234234
Test ID for the tab item. This can be used to find the tab item in the native view hierarchy.
235235

236+
#### `freezeOnBlur`
237+
238+
Boolean indicating whether to prevent inactive screens from re-rendering. Defaults to false. Defaults to true when `enableFreeze()` from `react-native-screens` package is run at the top of the application.
239+
240+
Only supported on iOS and Android.
241+
236242
### Events
237243

238244
The navigator can emit events on certain actions. Supported events are:

0 commit comments

Comments
 (0)