- useActions(): {
newSearch(query: SearchQuery, options?: SearchOptions): Promise<void>;
replaceFilter(
field: string,
value: undefined | string | InputSearchRangeFilter,
): Promise<void>;
simulateUpdateSearch(
query: SearchQuery,
options?: SearchOptions,
): { url: URL };
toggleProductFilter(
field: string,
value: string,
active: boolean,
): Promise<void>;
updateSearch(query: SearchQuery, options?: SearchOptions): Promise<void>;
} Returns {
newSearch(query: SearchQuery, options?: SearchOptions): Promise<void>;
replaceFilter(
field: string,
value: undefined | string | InputSearchRangeFilter,
): Promise<void>;
simulateUpdateSearch(
query: SearchQuery,
options?: SearchOptions,
): { url: URL };
toggleProductFilter(
field: string,
value: string,
active: boolean,
): Promise<void>;
updateSearch(query: SearchQuery, options?: SearchOptions): Promise<void>;
}
Preact hook that import current actions to the component. Actions should be used to modify state, making new searches, etc.
Should always be at the top of the component!