Skip to content

Commit a72074f

Browse files
authored
update and unify removeClippedSubviews prop description (#4818)
1 parent 62dcef0 commit a72074f

File tree

10 files changed

+48
-36
lines changed

10 files changed

+48
-36
lines changed

docs/flatlist.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -638,12 +638,12 @@ Set this true while waiting for new data from a refresh.
638638

639639
### `removeClippedSubviews`
640640

641-
This may improve scroll performance for large lists. On Android the default value is `true`.
642-
643641
:::warning
644-
May have bugs (missing content) in some circumstances - use at your own risk.
642+
Using this property may lead to bugs (missing content) in some circumstances - use at your own risk.
645643
:::
646644

645+
When `true`, offscreen child views are removed from their native backing superview when offscreen. This may improve scroll performance for large lists. On Android the default value is `true`.
646+
647647
| Type |
648648
| ------- |
649649
| boolean |

docs/optimizing-flatlist-configuration.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: optimizing-flatlist-configuration
3-
title: Optimizing Flatlist Configuration
3+
title: Optimizing FlatList Configuration
44
---
55

66
## Terms
@@ -23,9 +23,9 @@ Here are a list of props that can help to improve `FlatList` performance:
2323

2424
### `removeClippedSubviews`
2525

26-
| Type | Default |
27-
| ------- | ------- |
28-
| Boolean | False |
26+
| Type | Default |
27+
| ------- | ------------------------------------ |
28+
| Boolean | `true` on Android, otherwise `false` |
2929

3030
If `true`, views that are outside of the viewport are detached from the native view hierarchy.
3131

@@ -148,7 +148,6 @@ const renderItem = useCallback(({item}) => (
148148

149149
return (
150150
// ...
151-
152151
<FlatList data={items} renderItem={renderItem} />;
153152
// ...
154153
);

docs/scrollview.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -554,11 +554,15 @@ See [RefreshControl](refreshcontrol).
554554

555555
### `removeClippedSubviews`
556556

557-
Experimental: When `true`, offscreen child views (whose `overflow` value is `hidden`) are removed from their native backing superview when offscreen. This can improve scrolling performance on long lists.
557+
:::warning
558+
Using this property may lead to bugs (missing content) in some circumstances - use at your own risk.
559+
:::
558560

559-
| Type | Default |
560-
| ---- | ------- |
561-
| bool | `false` |
561+
When `true`, offscreen child views are removed from their native backing superview when offscreen. This may improve scroll performance for large lists. On Android the default value is `true`.
562+
563+
| Type |
564+
| ------- |
565+
| boolean |
562566

563567
---
564568

docs/sectionlist.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,11 @@ Set this true while waiting for new data from a refresh.
253253
Using this property may lead to bugs (missing content) in some circumstances - use at your own risk.
254254
:::
255255

256-
This may improve scroll performance for large lists.
256+
When `true`, offscreen child views are removed from their native backing superview when offscreen. This may improve scroll performance for large lists. On Android the default value is `true`.
257257

258-
| Type | Default |
259-
| ------- | ------- |
260-
| boolean | `false` |
258+
| Type |
259+
| ------- |
260+
| boolean |
261261

262262
---
263263

docs/virtualizedlist.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,12 +521,12 @@ Set this true while waiting for new data from a refresh.
521521
522522
### `removeClippedSubviews`
523523
524-
This may improve scroll performance for large lists.
525-
526524
:::warning
527525
Using this property may lead to bugs (missing content) in some circumstances - use at your own risk.
528526
:::
529527
528+
When `true`, offscreen child views are removed from their native backing superview when offscreen. This may improve scroll performance for large lists. On Android the default value is `true`.
529+
530530
| Type |
531531
| ------- |
532532
| boolean |

website/versioned_docs/version-0.81/flatlist.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,9 +638,11 @@ Set this true while waiting for new data from a refresh.
638638

639639
### `removeClippedSubviews`
640640

641-
This may improve scroll performance for large lists. On Android the default value is `true`.
641+
:::warning
642+
Using this property may lead to bugs (missing content) in some circumstances - use at your own risk.
643+
:::
642644

643-
> Note: May have bugs (missing content) in some circumstances - use at your own risk.
645+
When `true`, offscreen child views are removed from their native backing superview when offscreen. This may improve scroll performance for large lists. On Android the default value is `true`.
644646

645647
| Type |
646648
| ------- |

website/versioned_docs/version-0.81/optimizing-flatlist-configuration.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: optimizing-flatlist-configuration
3-
title: Optimizing Flatlist Configuration
3+
title: Optimizing FlatList Configuration
44
---
55

66
## Terms
@@ -23,9 +23,9 @@ Here are a list of props that can help to improve `FlatList` performance:
2323

2424
### removeClippedSubviews
2525

26-
| Type | Default |
27-
| ------- | ------- |
28-
| Boolean | False |
26+
| Type | Default |
27+
| ------- | ------------------------------------ |
28+
| Boolean | `true` on Android, otherwise `false` |
2929

3030
If `true`, views that are outside of the viewport are detached from the native view hierarchy.
3131

@@ -148,7 +148,6 @@ const renderItem = useCallback(({item}) => (
148148

149149
return (
150150
// ...
151-
152151
<FlatList data={items} renderItem={renderItem} />;
153152
// ...
154153
);

website/versioned_docs/version-0.81/scrollview.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -554,11 +554,15 @@ See [RefreshControl](refreshcontrol).
554554

555555
### `removeClippedSubviews`
556556

557-
Experimental: When `true`, offscreen child views (whose `overflow` value is `hidden`) are removed from their native backing superview when offscreen. This can improve scrolling performance on long lists.
557+
:::warning
558+
Using this property may lead to bugs (missing content) in some circumstances - use at your own risk.
559+
:::
558560

559-
| Type | Default |
560-
| ---- | ------- |
561-
| bool | `false` |
561+
When `true`, offscreen child views are removed from their native backing superview when offscreen. This may improve scroll performance for large lists. On Android the default value is `true`.
562+
563+
| Type |
564+
| ------- |
565+
| boolean |
562566

563567
---
564568

website/versioned_docs/version-0.81/sectionlist.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,15 @@ Set this true while waiting for new data from a refresh.
249249

250250
### `removeClippedSubviews`
251251

252-
> Note: may have bugs (missing content) in some circumstances - use at your own risk.
252+
:::warning
253+
Using this property may lead to bugs (missing content) in some circumstances - use at your own risk.
254+
:::
253255

254-
This may improve scroll performance for large lists.
256+
When `true`, offscreen child views are removed from their native backing superview when offscreen. This may improve scroll performance for large lists. On Android the default value is `true`.
255257

256-
| Type | Default |
257-
| ------- | ------- |
258-
| boolean | `false` |
258+
| Type |
259+
| ------- |
260+
| boolean |
259261

260262
---
261263

website/versioned_docs/version-0.81/virtualizedlist.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,9 +519,11 @@ Set this true while waiting for new data from a refresh.
519519
520520
### `removeClippedSubviews`
521521
522-
This may improve scroll performance for large lists.
522+
:::warning
523+
Using this property may lead to bugs (missing content) in some circumstances - use at your own risk.
524+
:::
523525
524-
> Note: May have bugs (missing content) in some circumstances - use at your own risk.
526+
When `true`, offscreen child views are removed from their native backing superview when offscreen. This may improve scroll performance for large lists. On Android the default value is `true`.
525527
526528
| Type |
527529
| ------- |

0 commit comments

Comments
 (0)