ReactNative Flatlist - RenderItem not working

前端 未结 3 627
鱼传尺愫
鱼传尺愫 2021-01-07 21:09

So I\'m trying to use React Native\'s FlatList renderItem property, but something very strange is happening.

The data property is set to an array which

3条回答
  •  清歌不尽
    2021-01-07 21:35

    Please read this answer carefully. I experienced it and wasted many hours to figure out why it was not re-rendering:

    We need to set extraData prop of FlatList if there is any change in the state like so:

    
    

    Please see the official documentation here:

    https://facebook.github.io/react-native/docs/flatlist.html

提交回复
热议问题