docs: added notice about beta for custom hooks in Medusa React (#4491)

This commit is contained in:
Shahed Nasser
2023-07-10 18:22:10 +03:00
committed by GitHub
parent 8eefd79947
commit 09157f0a58

View File

@@ -190,6 +190,16 @@ Learn more about how you can use mutations in [Tanstack Querys documentation]
### Custom Hooks
:::note
This feature is available in the `beta` version of Medusa React, which also requires the `beta` version of the Medusa core. You can install them with the following command:
```bash
npm install medusa-react@beta @medusajs/medusa@beta
```
:::
Medusa React provides a utility function `createCustomAdminHooks` that allows developers to consume their admin custom endpoints using the same Medusa React methods and conventions. It returns custom mutation and query hooks that you can use to retrieve and manipulate data using your custom endpoints. This utility function is useful when customizing the admin with widgets.
```ts