useWixModules()

Deprecated

This hook is deprecated. For more information, see Migrating from sdk-react.

The useWixModules() hook binds an SDK module to the authentication strategy of the enclosing WixProvider and returns an initialized module.

Note: This hook must be used inside an enclosing WixProvider component.

Example

Copy
import { products } from "@wix/stores"; //... const { queryProducts } = useWixModules(products); //... const { items: productList } = await queryProducts.find();
Did this help?