From 402161cd38945a74bb12299138b1c01d10f422b3 Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Mon, 23 Oct 2023 19:19:29 +0900 Subject: [PATCH] feat(react): update useErrorBoundary from experimental to stable --- docs/src/pages/docs/react/ErrorBoundary.en.mdx | 2 +- docs/src/pages/docs/react/ErrorBoundary.ko.mdx | 2 +- packages/react/src/ErrorBoundary.tsx | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/src/pages/docs/react/ErrorBoundary.en.mdx b/docs/src/pages/docs/react/ErrorBoundary.en.mdx index 10ce90cde..18d5e0b02 100644 --- a/docs/src/pages/docs/react/ErrorBoundary.en.mdx +++ b/docs/src/pages/docs/react/ErrorBoundary.en.mdx @@ -178,7 +178,7 @@ const Example = ( ## useErrorBoundary -useErrorBoundary is experimental feature, this interfaces could be changed +### useErrorBoundary().setError In children of ``, we can use useErrorBoundary().setError to make `` aware of the Error without throw. diff --git a/docs/src/pages/docs/react/ErrorBoundary.ko.mdx b/docs/src/pages/docs/react/ErrorBoundary.ko.mdx index 87620a708..9e62ddaf2 100644 --- a/docs/src/pages/docs/react/ErrorBoundary.ko.mdx +++ b/docs/src/pages/docs/react/ErrorBoundary.ko.mdx @@ -178,7 +178,7 @@ const Example = ( ## useErrorBoundary -useErrorBoundary는 실험 기능이므로 이 인터페이스는 변경될 수 있습니다. +### useErrorBoundary().setError ``의 children에서 useErrorBoundary().setError을 사용해 throw 없이도 ``에서 Error를 알도록 할 수 있습니다. diff --git a/packages/react/src/ErrorBoundary.tsx b/packages/react/src/ErrorBoundary.tsx index 724a06705..f3dd0932e 100644 --- a/packages/react/src/ErrorBoundary.tsx +++ b/packages/react/src/ErrorBoundary.tsx @@ -144,9 +144,6 @@ export const withErrorBoundary = = const ErrorBoundaryContext = createContext<({ reset: () => void } & ErrorBoundaryState) | null>(null) -/** - * @experimental This is experimental feature. - */ export const useErrorBoundary = () => { const [state, setState] = useState>({ isError: false,