I need to refresh frequently my hits because new item are added very often. So that it will avoid me to wait until my component be refreshed or mounted again before see the updated results list.
But i have no idea about how to do so.
export const Hits = connectInfiniteHits(({ hits, hasMore, refine,currentRefinement}) => {
return (
// return all my results here
);
});
How to tell my stateless component Hits
to render again with the updated results list ?
I've tried to use the refine()
but it doesn't work. this function is designed to load more results but i need to simply refresh all the result list.
I've also tried the refresh
attribute but the list just doesn't update and i still need to reset manually my component to get the updated list.
Any tips ?