-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace FlatList with another component? #250
Comments
Two major drawbacks:
|
Frankly, I find # Stupid bug in flat list.
# @see comment in ListCarousel.tsx
sed -i.bak -e "s/initialNumToRender={initialNumToRender}/initialNumToRender={data.length}/" node_modules/react-native-snap-carousel/src/carousel/Carousel.js Now, it would be nice if Of the two libraries that you found above I find |
Hey @PublicParadise, Well, But if you have to do that and, therefore, are ready to forget about the performance optimizations that are supposed to come with Regarding the two plugins I'm considering, I need to run a lot of tests first. It would definitely help if we can convince the author of Note that for the moment I don't feel confident basing my own plugin on a native one since I wouldn't be able to maintain it if the author stops doing so (whereas I would have no problem taking over a JS one). |
Hi @bd-arc, thanks for the tips. To be honest I got so frustrated with It seems that I myself was also looking into replacing |
Did you have any luck implementing one of those two solutions as a replacement? |
No, I only did the research. Back then I was still hoping that they would eventually fix
But I have a feeling that the native plugin ( |
Thanks for sharing your research 👍 To be honest, I don't have time right now to put all this to the test. If you feel like taking a dive into |
Update: as I was digging up those links I realized that Tal Kol from |
@bd-arc Same here, I have a pretty demanding day job and my time and resources are limited. |
Yes, Tal Kol has written some top-quality articles about React Native and performance optimization. Also, I was particularly interested in Wix's plugin |
@bd-arc What's the problem with |
Hey @naqvitalha, thanks for shining in! From my experience, and until now, everything built upon a Would you be interested in submitting a PR for this evolution so that it can be broadly and thoroughly tested? |
@bd-arc Sure. Let me do that. |
@naqvitalha @bd-arc Any status updates with the PR to replace |
Unrelated to From the docs:
It requires |
Hey @pcooney10, I've previously considered implementing a custom Have you tried something similar with |
@amitassaraf Contracts of this component are very similar to FlatList since props are passed down. For RLV layout provider is mandatory. It'll be a breaking change or we'll need to introduce a new mode. |
Hello everyone, I want to share a little of my experience using this component. I needed to use it within
Depending on your case, you can configure the values that best suit your needs. in this way you will have the expected performance with almost no memory leak |
@machester4 Thanks for sharing your findings! Those values won't fit everyone's use case, but the approach is sound ;-) |
You can apply that logic to your horizontal lists that are within a vertical list. in my case all my horizontal lists have 3 elements visible at a time. for that reason the values are of |
@naqvitalha Could you share how you replaced FlatList with RecylerView inside carousel? Also, do you support something like facebook/react-native#20500 in RecyclerView? |
@bd-arc Heads up, I am pretty sure this will affect |
Thanks for the heads up @PublicParadise!
It's definitely time to get rid of |
Hi, any updates on this field so far? |
Actually All we need is, as I said, an
So content size will be changing dynamically but nobody will care about it or feel it, as you could scroll to last item or any other index and it will get there without glitches, and you won't be doing so much work that there will be missing items while scrolling. |
Hi @naqvitalha, Do you have some branch or PR about to migrate flatlist to RLV for this component? It will be very useful for me. Thanks. |
Thank you for trying my component. For almost all scenes, you should do it like this:
And ensure all the parents of Carousel contains {flex:1} style. Pay attention to this tip:
LargeList can not work well if you want its items prop up LargeList's size. You should confirm your LargeList size is inherited from its parent or a bounded height. Forgive me for my pool English, if you understand Chinese. Check out this issue |
well said |
The
FlatList
component is just too buggy, period.These plugins may constitute an interesting replacement:
The text was updated successfully, but these errors were encountered: