TypeScript React Native Flatlist: How to give renderItem the correct type of it’s item?

I know it’s an old question but people googling it might still appreciate it.

import { FlatList, ListRenderItem } from 'react-native'
/*
.
.
.
*/
  renderItem: ListRenderItem<Emoticon> = ({ item }) => (
    <ListItem title={item.name} checkmark={item.checked} />
  );

Leave a Comment