This module is deprecated. For more information, see Migrating from dashboard-react.
The Dashboard React SDK is a collection of React utilites, components, and hooks that you can use to build Wix dashboard extensions with React. Together with the core React SDK, it provides the tools needed to work with the rest of the JavaScript SDK APIs and dashboard APIs from within React components. You can also use this setup to make calls to Wix's GraphQL API.
In order to use the Dashboard React SDK, install the @wix/dashboard-react
, @wix/sdk-react
, and react
packages.
To use the SDK, wrap your React component with the withDashboard()
higher-order component:
Use the useDashboard()
hook to retrieve and use the dashboard APIs.
For example:
When you wrap your component with withDashboard()
, a WixProvider
component is initialized with the dashboard host and authentication strategy. This allows you to use useWixModules()
to retrieve and use JavaScript SDK APIs.
For example: