You are reading the documentation for Vue Storefront v2. See the latest docs.

Home > @vue-storefront/core > useProductFactory

useProductFactory() function

Signature:

export declare function useProductFactory<PRODUCTS, PRODUCT_SEARCH_PARAMS, API extends PlatformApi = any>(factoryParams: UseProductFactoryParams<PRODUCTS, PRODUCT_SEARCH_PARAMS, API>): (id: string) => UseProduct<PRODUCTS, PRODUCT_SEARCH_PARAMS, API>;

Parameters

Parameter Type Description
factoryParams UseProductFactoryParams<PRODUCTS, PRODUCT_SEARCH_PARAMS, API>

Returns:

(id: string) => UseProduct<PRODUCTS, PRODUCT_SEARCH_PARAMS, API>