When changing routes in Next.js 14, the hits from useInfiniteHits() become an empty array []

Hi everyone,

I’ve been using react-instantsearch-nextjs with next.js 14, employing useInfiniteHits().

On a category page, when there are no products, hits returns an empty array , as expected. However, when I select another category page from the same page where products exist, hits also returns an empty array . After refreshing the page is the only time I receive hits with products.

Could someone help me understand this behaviour?