useWixModules()

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
1
import { products } from '@wix/stores';
2
3
//...
4
5
const { queryProducts } = useWixModules(products);
6
7
//...
8
9
const { items: productList } = await queryProducts.find();
Was this helpful?
Yes
No