DefGuard/defguard

Design and Implement React Error Boundary

Open

#593 opened on Mar 19, 2024

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Rust (107 forks)auto 404
good first issue

Repository metrics

Stars
 (2,779 stars)
PR merge metrics
 (PR metrics pending)

Description

Issue: When JS for some reason reads an undefined, null or have some unexpected crash/error it leaves now a user with blank white page which is not ideal.

Solution: Implement error boundaries around common interface concepts like "Setup"(eg. network wizzard or device setup), "Modal" or "Page". When in some context an critical error occurs we should let the user know something we can't recover from happen.

Image

Example: https://codesandbox.io/p/sandbox/react-error-boundary-example-djfng?file=%2Fsrc%2Findex.tsx%3A36%2C19 Resources: https://github.com/bvaughn/react-error-boundary

Contributor guide