We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b81dae9 commit 0edfc1cCopy full SHA for 0edfc1c
README.md
@@ -13,7 +13,15 @@ import ErrorBoundary from 'react-error-boundary';
13
</ErrorBoundary>
14
```
15
16
-You can also react to errors (eg for logging) by providing an `onError` callback:
+You can also use it as a HOC:
17
+
18
+```jsx
19
+import {withErrorBoundary} from 'react-error-boundary';
20
21
+const ComponentWithErrorBoundary = withErrorBoundary(YourComponent);
22
+```
23
24
+You can react to errors (eg for logging) by providing an `onError` callback:
25
26
```jsx
27
import ErrorBoundary from 'react-error-boundary';
0 commit comments