From ee4962eaee2c61b97f2905b3bb2d2a2ec799034b Mon Sep 17 00:00:00 2001 From: Aleksandar Toplek Date: Fri, 15 Sep 2023 13:50:08 +0200 Subject: [PATCH] Update use-promise.mdx --- apps/docs/pages/react-hooks/hooks/use-promise.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/docs/pages/react-hooks/hooks/use-promise.mdx b/apps/docs/pages/react-hooks/hooks/use-promise.mdx index d082c8ab..6cd8fb89 100644 --- a/apps/docs/pages/react-hooks/hooks/use-promise.mdx +++ b/apps/docs/pages/react-hooks/hooks/use-promise.mdx @@ -70,7 +70,8 @@ const getData = () => { }); }; -const { item, isLoading, error } = usePromise(getData); +const getDataPromise = getData(); +const { item, isLoading, error } = usePromise(getDataPromise); ``` ## Inspect