Skip to main content
This is the React InstantSearch v7 documentation. If you’re upgrading from v6, see the upgrade guide. If you were using React InstantSearch Hooks, this v7 documentation applies—just check for necessary changes. To continue using v6, you can find the archived documentation.
This guide describes what to do when there are no results, when there’s no query, or when there are errors. If results haven’t loaded, the search may still be in progress or the device may be offline. For more information, see No hits or is the search still in progress? If you want to feature content in your search results based on a set of conditions, you can use Algolia Rules:
To learn how to suppress InstantSearch’s initial , see Conditional requests.

Handle searches without results

When a query doesn’t return results, display a message and suggest changing the query or clearing filters.

Display a message

To display a fallback message when a query doesn’t return results, use the useInstantSearch Hook to create a wrapper component:
React
You can pass anything to display results, including InfiniteHits or a custom component that uses the useHits Hook.
To prevent undesirable, additional search requests, see Show and hide widgets.

Let users reset filters and facets

If users apply an overly specific configuration, they may not find any results. Account for this by letting them reset filters from the “no results” display so they can start another search. Do this with the ClearRefinements widget.
React

Handle empty queries

By default, InstantSearch sends search requests even when the query is empty. To hide results until users enter a query, use the following wrapper. This hides the results without preventing search requests.
React
Follow best practices for showing and hiding React InstantSearch widgets to prevent undesirable additional search requests.

Handle search errors

When an error occurs, you can display a specific piece of content to help users return to the standard state.
React
Last modified on October 8, 2026