fix(deps): update dependency react-error-boundary to v4 #223
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^3.1.4
->^4.0.0
Release Notes
bvaughn/react-error-boundary (react-error-boundary)
v4.0.12
Compare Source
v4.0.11
Compare Source
9b7b15b
)v4.0.10
Compare Source
v4.0.9
Compare Source
v4.0.8
Compare Source
v4.0.7
Compare Source
*Replaced post-processing
"use client"
insertion step with a custom Parcel plug-in. This should hopefully produce better source maps.v4.0.6
Compare Source
v4.0.5
Compare Source
Move
"use client"
directive to top of the bundled file.v4.0.4
Compare Source
README changes only
v4.0.3
Compare Source
withErrorBoundary
forwards refs"use client"
directivev4.0.2
Compare Source
Fix broken TypeScript definitions file (#133, https://github.com/parcel-bundler/parcel/issues/8908)
v4.0.1
Compare Source
ErrorBoundaryContext
around fallback UI as well, so theuseErrorBoundary
hook could be used within the fallback component to reset the boundary.For example:
See this demo: https://codesandbox.io/s/nostalgic-browser-e9lpmf
v4.0.0
Compare Source
useErrorHandler
hook withuseErrorBoundary
; can be used to trigger an error boundary or dismiss oneonReset
andonResetKeys
props; pass "details" object explaining the cause of the resetWhy did the
useErrorHandler
hook change?The old hook had two design flaws, both related to the
givenError
parameter:throw
this value. This seemed unnecessary, because if a component already has a reference to an error during render, it can justthrow
the value itself.null
orundefined
values. (Although an edge case, JavaScript enables throwing any values/types.)If you were using the
givenError
functionality– you can now just throw the value directly instead.How can I use the new
useErrorHandler
hook?Show the nearest error boundary from an event handler
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.
This hook can be used to pass those errors to the nearest error boundary:
Dismiss the nearest error boundary
A fallback component can use this hook to request the nearest error boundary retry the render that original failed.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.