Skip to content

Conversation

@AbhiPrasad
Copy link
Member

Extend the ErrorBoundary component to allow it to support render props
children. This means that patterns like the following are viable:

<Sentry.ErrorBoundary>
  {() => (
    <Suspense fallback={<div>Loading...</div>}>
      <Other />
    </Suspense>
  )}
</Sentry.ErrorBoundary>

Fixes #3052

Extend the ErrorBoundary component to allow it to support render props
children. This means that patterns like the following are viable:

```jsx
<Sentry.ErrorBoundary>
  {() => (
    <Suspense fallback={<div>Loading...</div>}>
      <Other />
    </Suspense>
  )}
</Sentry.ErrorBoundary>
```

Fixes #3052
@AbhiPrasad AbhiPrasad requested a review from kamilogorek as a code owner July 9, 2021 17:40
@github-actions
Copy link
Contributor

github-actions bot commented Jul 9, 2021

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 21.43 KB (-0.01% 🔽)
@sentry/browser - Webpack 22.46 KB (0%)
@sentry/react - Webpack 22.49 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 28.92 KB (-0.01% 🔽)

@kamilogorek kamilogorek merged commit 3095f4b into master Jul 12, 2021
@kamilogorek kamilogorek deleted the abhi-react-child-func branch July 12, 2021 08:49
@kamilogorek
Copy link
Contributor

Merged to include in the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend React ErrorBoundary component to accept render props for children

3 participants