Skip to content

Commit

Permalink
docs: update README to used named export for ErrorBoundary (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Oberegger authored May 1, 2020
1 parent b032513 commit 8c733a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ that may throw an error. This will handle errors thrown by that component and
its descendants too.

```jsx
import ErrorBoundary from 'react-error-boundary'
import {ErrorBoundary} from 'react-error-boundary'

function ErrorFallback({error, componentStack}) {
return (
Expand All @@ -82,7 +82,7 @@ const ui = (
You can react to errors (e.g. for logging) by providing an `onError` callback:

```jsx
import ErrorBoundary from 'react-error-boundary'
import {ErrorBoundary} from 'react-error-boundary'

const myErrorHandler = (error: Error, componentStack: string) => {
// Do something with the error
Expand Down

0 comments on commit 8c733a0

Please sign in to comment.