0

Facebook has recently released some very cool list components.

"No more ListViews or DataSources, stale rows, ignored bugs, or excessive memory consumption - with the latest React Native March 2017 release candidate (0.43-rc.1) you can pick from the new suite of components what best fits your use-case, with great perf and feature sets out of the box:"

In particular

  FlatList, SecionList, and VirtualisedList

How does Native Base support these components. Looks like ListView is deprecated now.

gitsensible
  • 551
  • 1
  • 8
  • 19

1 Answers1

1

Nativebase will work fine with the new List components - you just need to use the appropriate components. Considering the FlatList component you code would look something like this.

render() {
  return (
    <List>
      <FlatList
        data={[...]}
        renderItem={({ item }) => (
          <ListItem>
              <Text>{item.name}</Text>
          </ListItem>
        )}
      />
    </List>
  )
}

Also, the ListView isn't deprecated as of right now. The new List components are still new so they've got a few issues that aren't present in the ListView at this time.

Spencer Carli
  • 686
  • 3
  • 6