useInstantSearch hook provides access to the InstantSearch instance and the current search state.
Import
Parameters
Whether to catch errors from the search lifecycle. When
true, errors are caught and available in the error property.Returns
The current UI state for all indices.
Function to update the UI state.
The UI state for the current index.
Function to update the UI state for the current index.
The render state for all indices, containing widget states.
The render state for the current index.
The search results from Algolia.
Results for all indices in a multi-index search.
The current status of the search.
The error that occurred during search (only when
status === 'error').Function to refresh the search results by clearing the cache.
Function to add middlewares to InstantSearch. Returns a cleanup function.