As of September 2024, the Wix React SDK is deprecated and closed to new users. You can access the functionality of sdk-react in alternative ways.
Below is a list of the deprecated sdk-react
components and functions and their alternatives in the Dashboard SDK.
WixProvider
There is no use case for WixProvider
because sdk-react
is deprecated.
useWixAuth()
There is no use case for useWixAuth()
because WixProvider
is deprecated.
useWixFetch()
Instead of making fetch requests with useWixFetch()
, use httpClient.fetchWithAuth()
from @wix/essentials
.
useWixFetchWithAuth()
Instead of making fetch requests with useWixFetchWithAuth()
, use httpClient.fetchWithAuth()
from @wix/essentials
.
useWixModules()
You don't need to use useWixModules()
because its functionality is now built in.
For example, where previously you would need to use:
import { products } from "@wix/stores";
const { queryProducts } = useWixModules(products);
const { items: productList } = await queryProducts.find();
You can access queryProducts
directly:
import { products } from "@wix/stores";
const { queryProducts } = products;
const { items: productList } = await queryProducts.find();