react-native icon indicating copy to clipboard operation
react-native copied to clipboard

VirtualizedList - Please keep disableVirtualization (do not deprecate)

Open cristianoccazinsp opened this issue 4 years ago • 14 comments

FlatList/VirtualizedList is great. However, it is still quite bugged when using complex components or nested lists. I have a case with up to 3 nested FlatList elements, and things start to become really messy. For example, visible components will randomly unmount and mount on some state changes (for some reason that's beyond me, e.g., when implementing some collapse/expand logic). I don't really blame the implementation, but really the design of having such a monster list which is also interactive/editable.

For this reason, and after hours of testing, disableVirtualization was the holy grail. Using this flag would immediately remove all flickering, white spaces, random unmounts, and so on. I know this defeats the purpose of virtualization, but the list is still very usable with disableVirtualization=true . The fact that the list still lazy loads is very useful, I would otherwise need to implement lazy loading myself.

React Native version:

System: OS: macOS 10.14.5 CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz Memory: 678.54 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.15.3 - /usr/local/bin/node npm: 6.9.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3 Android SDK: API Levels: 28 Build Tools: 28.0.3 IDEs: Android Studio: 3.4 AI-183.6156.11.34.5522156 Xcode: 10.3/10G8 - /usr/bin/xcodebuild npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.60.5 => 0.60.5 npmGlobalPackages: create-react-native-app: 2.0.2 react-native-cli: 2.0.1

Steps To Reproduce

FlatList is bogus with complex structures/use cases and disableVirtualization provides a good work around. Please consider keeping this variable as part of the API, or provide some way to disable component unmounting. Not even an obscenely large windowSize helps.

cristianoccazinsp avatar Aug 28 '19 19:08 cristianoccazinsp

Agree!

When disableVirtualizationis true, it significantly reduces the number of views rendered in initial mount, from 1500 to 600 views according to Perf Monitor. The same result can be achieved with windowSize prop, but it introduces issues when fast scrolling.

In addition, the number of re-renders of items in FlatList also drops in more than half.

DaniyarJakupov avatar Sep 03 '19 08:09 DaniyarJakupov

It also helps to provide a workaround for FlatList's weird behavior with inverted prop on web. https://github.com/necolas/react-native-web/issues/1254

ghost avatar Sep 17 '19 07:09 ghost

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

stale[bot] avatar Dec 16 '19 07:12 stale[bot]

Please leave open.

cristianoccazinsp avatar Dec 16 '19 13:12 cristianoccazinsp

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

stale[bot] avatar Mar 15 '20 14:03 stale[bot]

Any news? Still a concern

El dom., 15 de marzo de 2020 11:47, stale[bot] [email protected] escribió:

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/26237#issuecomment-599219848, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALU263GXNIAAVVRVOVHJQADRHTS6JANCNFSM4IRQBH7A .

cristianoccazinsp avatar Mar 15 '20 15:03 cristianoccazinsp

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

stale[bot] avatar Jun 13 '20 15:06 stale[bot]

Still an issue

El sáb., 13 de junio de 2020 12:33, stale[bot] [email protected] escribió:

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/26237#issuecomment-643639135, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALU263H2VGSMNSPRMLIMWC3RWOL4PANCNFSM4IRQBH7A .

cristianoccazinsp avatar Jun 13 '20 15:06 cristianoccazinsp

Property still valid on RN 0.63.x. Any thoughts about keeping this and removing the deprecated label? This can be very convenient sometimes.

cristianoccazinsp avatar Aug 08 '20 16:08 cristianoccazinsp

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

stale[bot] avatar Dec 25 '20 23:12 stale[bot]

Still an issue.

El vie., 25 de diciembre de 2020 20:16, stale[bot] [email protected] escribió:

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/26237#issuecomment-751298825, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALU263C2UJ25MTPFDC7KVPLSWUMOPANCNFSM4IRQBH7A .

cristianoccazinsp avatar Dec 25 '20 23:12 cristianoccazinsp

any news on this one?

jonrigerths2 avatar Dec 02 '21 19:12 jonrigerths2

+1 sticky headers flickers a lot and with disableVirtualization true doesn't happen no more

pedrolopes10 avatar Apr 18 '22 18:04 pedrolopes10

Please keep this, it helps with a lot of libraries based on flatlist

DanielWFrancis avatar Oct 20 '22 03:10 DanielWFrancis

+1

diVid3 avatar Nov 01 '22 13:11 diVid3