https://github.com/hamlim/react-error-boundary
An unopinionated `<ErrorBoundary />` React component for React 16+.
https://github.com/hamlim/react-error-boundary
error-boundaries error-handling react render-props
Last synced: over 1 year ago
JSON representation
An unopinionated `<ErrorBoundary />` React component for React 16+.
- Host: GitHub
- URL: https://github.com/hamlim/react-error-boundary
- Owner: hamlim
- Created: 2017-08-12T01:34:43.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-04-04T01:09:04.000Z (about 8 years ago)
- Last Synced: 2025-03-09T05:32:40.676Z (over 1 year ago)
- Topics: error-boundaries, error-handling, react, render-props
- Language: JavaScript
- Size: 152 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React-Error-Boundary 🚯
An unopinionated `` React component for React 16+.
```JSX
{error => error
? (
Oh no an error occurred!
)
: (
)
}
```
## Props:
* `onError` method called after `` catches an error.
* type `function`
* Called with one argument, the `error` object thrown
* `children` function called inside render
* Called with the error object, will be null initially
* This is the only thing returned from render, so you have full control over rendering