const { hits } = useInfiniteHits()
<FlatList
data={hits}
renderItem={({ item }) => (
<TouchableOpacity
onPress={() => {
onCardPress(item.objectID)
}}
>
<Card
title={item.title}
output={item.output}
/>
</TouchableOpacity>
)}
keyExtractor={(item, idx) => idx.toString()}
onEndReached={() => {}}
onEndReachedThreshold={0.1}
refreshing={false}
onRefresh={onRefresh}
/>
I am using Hits and FlatList to show a list of items on a search page. When I press on the item, it goes to the details page where the item is fetched from Firebase. This item can be edited or deleted, upon doing either of these operations the document and index in the Algolia updates. However, this update is not reflected when I come back to the search page. I can still see old content or the items I had deleted. It seems that the useInfiniteHits() hook is not fetching the updated index. Is there a way to update the hits?