Shopify / flash-list

A better list for React Native
https://shopify.github.io/flash-list/
MIT License
5.64k stars 283 forks source link

Empty page on Android #604

Open zjkuang opened 2 years ago

zjkuang commented 2 years ago

Current behavior

Sometimes we got an empty page with FlashList. We used the Component Inspector to check the component hierarchy shown as below:

Screenshot_20220916-131959_GasBuddy

Expected behavior

It should show the contents provided by the data source.

To Reproduce

It is not reproducible every time, which makes it seem like a race condition.

Platform:

Environment

@shopify/flash-list 1.2.2

naqvitalha commented 2 years ago

FlashList does skip the first frame to measure itself. If you already have an estimate you can pass it through estimatedListSize prop and content will render immediately.

VladyslavMartynov commented 2 years ago

@naqvitalha I also start using FlashList and even with estimatedListSize I have blank screen and then after scrolling i have my listItems

max-kim commented 2 years ago

@naqvitalha Faced the same issue with blank content on iOS when I use the FlashList within the BottomSheet. Steps to reproduce:

Case 1:

Case 2:

hope it may help you to figure out the nature of the issue

gokul1099 commented 2 years ago

I am also facing same kind of issue in android. UI components passed to the renderItem is not rendered completely.

In some the list item the "Add To Cart" button is not showing, only white space is showing. when i try to add background colour for that button, still showing white space. When I scroll down in some of the item the button is present.