From 6824a7a91ad580303feba9a77b81c0177f582c06 Mon Sep 17 00:00:00 2001 From: Cameron Aziz Date: Tue, 26 Apr 2022 01:00:57 -0700 Subject: [PATCH] fix(react): Add children prop type to ErrorBoundary component (#4966) --- packages/react/src/errorboundary.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react/src/errorboundary.tsx b/packages/react/src/errorboundary.tsx index fb3987d316cb..0a03cb822c8b 100644 --- a/packages/react/src/errorboundary.tsx +++ b/packages/react/src/errorboundary.tsx @@ -20,6 +20,7 @@ export type FallbackRender = (errorData: { }) => React.ReactElement; export type ErrorBoundaryProps = { + children?: React.ReactNode | (() => React.ReactNode); /** If a Sentry report dialog should be rendered on error */ showDialog?: boolean; /** @@ -151,7 +152,7 @@ class ErrorBoundary extends React.Component React.ReactNode)(); } return children; }