DLevai94 Github contribution chart
DLevai94 Github Stats
DLevai94 Most Used Languages

Activity

26 Sep 2022

DLevai94

started

Started On 26 Sep 2022 at 10:35:55
Issue Comment

DLevai94

[Warning] FlashList's rendered size is not usable.

Hi there, so I tried migrating from Flatlist, a but I keep getting a warning:

FlashList's rendered size is not usable. Either the height or width is too small (<2px). 
Please make sure that the parent view of the list has a valid size. 
FlashList will match the size of the parent. 

This is what my code looks like:

const FlashListView = ({ data }: IProps) => {
    const keyExtractor = (item: IBookmark) => item._id;
    return (
        <View style={{ flex: 1 }}>
            <FlashList
                data={data}
                estimatedItemSize={200}
                keyExtractor={keyExtractor}
                renderItem={({ item }) => (
                    <View style={{ height: 10, width: "100%" }}>
                          {item.name}
                    </View>
                )}
            />
        </View>
    );
}; 

I understand it's simply a warning, but I'm curious if I've been missing something or doing something wrong, thanks.

The project is on Expo SDK 45 (dev-client) & react-native: 0.68.2.

Forked On 06 Sep 2022 at 08:20:52

DLevai94

You can monitor onLayout on the list and see when it's raised as 0. Overall, this is expected if the list's size is incorrect.

What would be a correct list size? Why flex: 1 isn't ok to size the parent view? I think this warning is confusing.

Commented On 06 Sep 2022 at 08:20:52

DLevai94

Update README.md

Pushed On 16 Aug 2022 at 05:57:36

DLevai94

started

Started On 03 Aug 2022 at 07:55:50