virtua icon indicating copy to clipboard operation
virtua copied to clipboard

Consider supporting React Native

Open inokawa opened this issue 1 year ago • 6 comments

It may be possible if we detect element's resize with onLayout of View and get scroll position from ScrollView.

inokawa avatar Jul 17 '23 11:07 inokawa

what would be the difference with FlatList / SectionList / VirtualizedList?

morajabi avatar Jul 30 '23 15:07 morajabi

Yes, I know there have been already FlatList and VirtualizedList (and also FlashList).

I'm not sure it's worth doing. If we were to make it, the RN version would work without configuration of height/width like web version. And it should support bi-directional infinite scrolling like Twitter App in the future.

inokawa avatar Jul 30 '23 15:07 inokawa

@inokawa Update: we used FlashList in iOS expo app. In my experience it's focused on recycling views and it fails to accommodate certain use-cases very well (eg. reverse scrolling with sticky items). So it's not a one-size-fits-all solution and there is room for another library.

morajabi avatar Oct 15 '23 15:10 morajabi

Thank you for sharing the information! Although React Native is a bit de-prioritized than something for web to me, it will be worth trying it.

inokawa avatar Oct 16 '23 11:10 inokawa

@inokawa Same. Althought RN lists can be better, virtua can provide the most value in web given the lack modern, up-to-date and light weight solutions.

morajabi avatar Oct 16 '23 13:10 morajabi

Probably there are no flushSync alternatives in react native. https://github.com/facebook/react-native/issues/41487

inokawa avatar Dec 05 '23 04:12 inokawa