You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,8 @@ const ui = (
98
98
### `useErrorBoundary` hook
99
99
Convenience hook for imperatively showing or dismissing error boundaries.
100
100
101
+
#### Show the nearest error boundary from an event handler
102
+
101
103
React only handles errors thrown during render or during component lifecycle methods (e.g. effects and did-mount/did-update). Errors thrown in event handlers, or after async code has run, will not be caught.
102
104
103
105
This hook can be used to pass those errors to the nearest error boundary:
@@ -106,7 +108,7 @@ This hook can be used to pass those errors to the nearest error boundary:
This package can also be used as a [higher-order component](https://legacy.reactjs.org/docs/higher-order-components.html) that accepts all of the same props as above:
0 commit comments