useClearRefinements hook provides the logic to build a custom component that clears all currently active refinements.
Import
Parameters
The attributes to include in the refinements to clear. Cannot be used with
excludedAttributes.The attributes to exclude from the refinements to clear. Cannot be used with
includedAttributes.Function to transform the items passed to the templates.
Returns
Function that triggers the clear of all currently refined values.
Whether the search state can be refined (i.e., there are active refinements).
Whether the search state is refined.
Function to create a URL for the next state when refinements are cleared.