Skip to content
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

React Native FlashList Flickering #934

Open
2 tasks done
nawafthedistance opened this issue Oct 18, 2023 · 5 comments
Open
2 tasks done

React Native FlashList Flickering #934

nawafthedistance opened this issue Oct 18, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@nawafthedistance
Copy link

Current behavior

Lists I implemented with FlashList are flickering when any state on the screen changes. Just swtiching from FlashList to FlatList fixes the issue. Attaching FlashList (flickering) & FlatList (non-flickering) recordings.

Screen.Recording.2023-10-18.at.10.17.43.pm.mov
Screen.Recording.2023-10-18.at.10.19.09.pm.mov

Code of one of the lists

<FlashList
data={dummyInfoData}
keyExtractor={(item, index) => item?.title + index}
renderItem={({item}) => (

)}
ItemSeparatorComponent={item => (
<Spacer
vertical
size={15}
testID={${testID}.infoTab.spacer}
/>
)}
/>

Platform:

  • iOS
  • Android

Environment

@shopify/flash-list@^1.5.0
[email protected]

@nawafthedistance nawafthedistance added the bug Something isn't working label Oct 18, 2023
@sathish123345
Copy link

If you have any Math.random function in the renderItem component it will lead to flickering

@nduyvu1511
Copy link

That happens because you are using the estimatedItemSize prop, but defining a number smaller than what the view should draw.

@marcusnunes89
Copy link

I have the same issue. In my case, I need to update the state because I'm changing the number of columns in the list.
Any ideas on how to improve this?

@aqigif
Copy link

aqigif commented May 14, 2024

i experience the same way :

i am using

  • react-native-tab-view @ 3.5.2
  • react-native 0.73.7 (new arch enabled)
  • android
  • @shopify/flash-list 1.6.4

any idea how to solve it?

@young-st511
Copy link

I think I fixed it. I just added the estimatedListSize prop to FlashList. It seems that FlashList didn't know its initial size in some cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants