You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I ran into a weird issue while using the useInfiniteHits hook. When useInfiniteHits is used together with useDynamicWidgets and there are no filters present on the page, no hits will be returned. useInstantSearch will still return hits. This only happens when solely rendering on the client side, it works fine if the content is rendered on the server side beforehand.
We've since found a workaround for this issue by moving useDynamicWidgets to a component that's only rendered whenever filters are present on this page, circumventing the issue. However, I am still wondering if this is intended behavior and if this is a bug or an implementation issue.
🐛 Current behavior
Hi! I ran into a weird issue while using the
useInfiniteHits
hook. WhenuseInfiniteHits
is used together withuseDynamicWidgets
and there are no filters present on the page, no hits will be returned.useInstantSearch
will still return hits. This only happens when solely rendering on the client side, it works fine if the content is rendered on the server side beforehand.We've since found a workaround for this issue by moving
useDynamicWidgets
to a component that's only rendered whenever filters are present on this page, circumventing the issue. However, I am still wondering if this is intended behavior and if this is a bug or an implementation issue.Thanks in advance!
🔍 Steps to reproduce
useInfiniteHits
hookuseDynamicWidgets
Live reproduction
https://codesandbox.io/p/sandbox/flamboyant-rosalind-9h48gq?file=%2Fsrc%2FCustomHits.tsx
💭 Expected behavior
I expected hits to be returned from
useInfiniteHits
as normal, instead no hits are returned.Package version
react-instantsearch: 7.6.0, instantsearch.js: 4.65.0
Operating system
No response
Browser
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: