When updating the data passed to the FlatList, it will re-render all items from the beginning. How to prevent this behavior, we need to render only the newly added items without affecting the existing ones.
You are experiencing this issue because your flatlist is embedded in a library/another component, fix the issue with the rendering for that library, for instance, mine was embedded in a tabs library component and it was causing my flatlist to rerender all over, so i fixed the scene rending for the tabs component and that solved my issue
How can we optimize heavy items flat list ? They all have different sizes. And backend is sending their size via API. But beside that, one item has comments part, where First two comments are visible. This can defer in size. On lower end devices app becomes really slow. We have memoized components, used pagination, fast image, but still there is an issue.
how do we implement onViewableItemsChanges in real example instead of console.log? e.g. I want to calculate then display the information of viewable items on the screen (the calculation maybe expensive)
@@notjustdevHello Am building a react native app but am having a issue with flatlist please anyone should help me out . I render the video peacefully but each video are all playing, its like listening to 10 drummers at the same time .please what should or can i do to make the focus video to be the only one playing 🙏🙏🙏 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🏼🙏🏼🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽
This is amazing thank you, Quick one, if a result from the JSON didn't have an image for example, how could we only display the text for that result and skip the image view?
Thanks sir for this video. In this if list is large then at the time of pull to refresh array is not clearing and when api response came data is duplicating. For that i need to add list dependency in useEffect and once list clear calling api.
To fix the duplication issue, clear the array right before fetching new data in your pull-to-refresh logic, not in useEffect. This ensures the list is empty and ready for fresh data.
@@notjustdev yes sir i do before fetching new data but array is not clearing immidiately so that its duplicating item.To fix that i need to call api from useEffect after clearing array. thanks
Hey! Excelente video! Do you can upgrade your video about RevenueCat with React Native(Expo) principally in Android, because exists some changes in new versions and don't work perfectly. An example is when I show offerings in Android, unfortunally, don't show in my screen.
When updating the data passed to the FlatList, it will re-render all items from the beginning. How to prevent this behavior, we need to render only the newly added items without affecting the existing ones.
same issue
You need to wrap your renderItem in a use callback. You also need to wrap the export of your item component with memo()
@@jackbader8570 Thanks for the solution
You are experiencing this issue because your flatlist is embedded in a library/another component, fix the issue with the rendering for that library, for instance, mine was embedded in a tabs library component and it was causing my flatlist to rerender all over, so i fixed the scene rending for the tabs component and that solved my issue
How can we optimize heavy items flat list ? They all have different sizes. And backend is sending their size via API. But beside that, one item has comments part, where First two comments are visible. This can defer in size. On lower end devices app becomes really slow. We have memoized components, used pagination, fast image, but still there is an issue.
how do we implement onViewableItemsChanges in real example instead of console.log? e.g. I want to calculate then display the information of viewable items on the screen (the calculation maybe expensive)
Thanks teacher... This was exactly what I needed
Glad it was helpful!
@@notjustdevHello
Am building a react native app but am having a issue with flatlist please anyone should help me out .
I render the video peacefully but each video are all playing, its like listening to 10 drummers at the same time .please what should or can i do to make the focus video to be the only one playing 🙏🙏🙏
🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🏼🙏🏼🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽
This is amazing thank you,
Quick one, if a result from the JSON didn't have an image for example, how could we only display the text for that result and skip the image view?
Did you ever figure out why duplicate items were showing up in the list? I'm running into similar issues
Thanks sir for this video.
In this if list is large then at the time of pull to refresh array is not clearing and when api response came data is duplicating.
For that i need to add list dependency in useEffect and once list clear calling api.
To fix the duplication issue, clear the array right before fetching new data in your pull-to-refresh logic, not in useEffect. This ensures the list is empty and ready for fresh data.
@@notjustdev
yes sir i do before fetching new data but array is not clearing immidiately so that its duplicating item.To fix that i need to call api from useEffect after clearing array.
thanks
Hey! Excelente video!
Do you can upgrade your video about RevenueCat with React Native(Expo) principally in Android, because exists some changes in new versions and don't work perfectly. An example is when I show offerings in Android, unfortunally, don't show in my screen.
Thanks broo.
You're welcome 🙌
My like was number 137, those who know, know...
What am I missing?
@@notjustdev In the show, Rick, Morty, me and you, my teacher Vadim, live in the c-137 reality! 🤣🤣🤣
Bro please make normal length videos nobody has time to sit through a THREE HOUR tutorial
Data says otherwise
@@notjustdev that’s great i’m glad your wallet is happy 👍
🎉🎉🎉