-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for componentDidCatch + getDerivedStateFromError
- Loading branch information
1 parent
cbe881a
commit accec09
Showing
3 changed files
with
336 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
'preact-render-to-string': minor | ||
--- | ||
|
||
Add support for error boundaries via `componentDidCatch` and `getDerivedStateFromError` | ||
|
||
This feature is disabled by default and can be enabled by toggling the `errorBoundaries` option: | ||
|
||
```js | ||
import { options } from 'preact'; | ||
|
||
// Enable error boundaries | ||
options.errorBoundaries = true; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters