Skip to main content

useSearchSuggest

This hook provides access to search suggestion terms from the block data, typically used to render search suggestion chips or tags.

Import​

import { useSearchSuggest } from '@appmaker-xyz/shopify';

Basic Usage​

const { data, terms } = useSearchSuggest({ blockData });

Parameters​

ParameterTypeDescription
blockDataObjectBlock data containing search suggestion terms.

Return Value​

PropertyTypeDescription
dataObjectThe raw block data passed to the hook.
termsArrayArray of search suggestion term objects. Empty array if no terms available.