React SDK

The React SDK enables the integration of Wix JavaScript SDK APIs within React components. It's compatible with both Wix Headless and Wix Apps. When developing a dashboard extension app, the React SDK can be effectively used alongside the React Dashboard SDK.

The React SDK (@wix/sdk-react) includes everything from the regular SDK (@wix/sdk). As a result, you only have to install @wix/sdk-react, and you can import anything from @wix/sdk through @wix/sdk-react.

In addition, the React SDK offers the following components and hooks:

  • WixProvider: Enables the use of Wix JavaScript SDKs within React components. All functionality of @wix/sdk-react must be contained inside a Wix Provider.
  • useWixAuth(): Returns the authentication strategy of the enclosing WixProvider.
  • useWixFetch(): Returns a function used to call endpoints from the Wix REST API.
  • useWixModules(): Binds an SDK module to the authorization strategy of the enclosing WixProvider and returns an initialized module.

To get started using the React SDK, see Setup.

Was this helpful?