How to do an Horizontal ListView, or FlatList in react-native

The answer is to add the horizontal property set to true.

Yeah now it’s described in the doc: https://reactnative.dev/docs/flatlist#horizontal

So obviously a FlatList is a Child of a ScrollView so he got the Horizontal Bool.

  <FlatList
    horizontal={true}
    data={DATA}
    renderItem={renderItem}
    keyExtractor={(item) => item.id}
    extraData={selectedId}
  />

Ciao

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)