How do you differentiate between no hits return vs loading (fetching from network) state? #5358
-
Using Our UI as of the moment sees no difference between fetching from network state vs no results state from response. We'd like to show proper loading indicators when the hook is currently fetching from network and only show really something else for empty results returned. How do we go about this? EDIT: This is also true for other hooks like |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
function Loader() {
const { isSearchStalled } = useSearchBox({}, { $$widgetType: "custom.loadingIndicator" });
if (isSearchStalled) {
return "search loading…";
}
return null
} |
Beta Was this translation helpful? Give feedback.
-
Hi, you can now leverage |
Beta Was this translation helpful? Give feedback.
Hi, you can now leverage
useInstantSearch()
to retrieve thestatus
of your search implementation.