fix(core): make error boundary fallback a component instead of a callback (#7368)

This commit is contained in:
Joshua Chen 2022-05-07 22:35:57 +08:00 committed by GitHub
parent 77fa3d1470
commit f29bb73300
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 18 deletions

View file

@ -55,7 +55,7 @@ This component doesn't catch build-time errors and only protects against client-
#### Props {#errorboundary-props}
- `fallback`: an optional callback returning a JSX element. It will receive two props: `error`, the error that was caught, and `tryAgain`, a function (`() => void`) callback to reset the error in the component and try rendering it again.
- `fallback`: a React component. The error boundary will render the component with two props: `error`, the error that was caught, and `tryAgain`, a function (`() => void`) callback to reset the error in the component and try rendering it again.
### `<Head/>` {#head}