From 09157f0a58e78356592a863cf0fea5d8f1161e3a Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Mon, 10 Jul 2023 18:22:10 +0300 Subject: [PATCH] docs: added notice about beta for custom hooks in Medusa React (#4491) --- docs/content/medusa-react/overview.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/content/medusa-react/overview.md b/docs/content/medusa-react/overview.md index 1121704e6c..8ffc93cd49 100644 --- a/docs/content/medusa-react/overview.md +++ b/docs/content/medusa-react/overview.md @@ -190,6 +190,16 @@ Learn more about how you can use mutations in [Tanstack Query’s 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