React Native: Using Hooks in Flatlist
You cannot call hooks inside functional component. You can instead convert functions to functional components
<FlatList
removeClippedSubviews
numColumns={1}
{...{ data }}
extraData={this.state}
renderItem={object => <TextComponent item={object} />}
/>
function TextComponent ({item}) {
const [foo, setFoo] = useState("bar");
return <Text>{foo}</Text>;
}