Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReactDevTools] add custom error view for caught error #2

Closed
wants to merge 17 commits into from

Conversation

mondaychen
Copy link
Owner

@mondaychen mondaychen commented Mar 29, 2022

Resolves facebook#24096

Summary

Add custom views to handle unknown errors reported from backend

How did you test this change?

Tested using the app in facebook#24096

The error shown in dev tools extension:
Screen Shot 2022-03-29 at 11 14 44 AM

When user switch to console, the detailed error and the original error is logged there. In this case, the original error is an object instead of a JS Error
Screen Shot 2022-03-29 at 11 21 11 AM

Custom error view to notify user to upgrade dev tools:
Screen Shot 2022-03-29 at 11 43 28 AM

Brian Vaughn and others added 13 commits March 31, 2022 10:43
* Test suite for hydration diff warnings

* Test both variants

* Add more edge cases
* SS2 fixture not working locally fix

* Fix prettier issue

* prettier excess line fix

* Update render.js

* Update README.md

Co-authored-by: dan <[email protected]>
…acebook#24236)

* Delay showing fallback if hydrating suspends

* Fix up

* Include all non-urgent lanes

* Moar tests

* Add test for transitions
…facebook#24216)

* [ReactDebugTools] wrap uncaught error from rendering user's component

* fix lint

* make error names more package specific

* update per review comments

* fix tests

* fix lint

* fix tests

* fix lint

* fix error name & nits

* try catch instead of mocking error

* fix test for older node.js version

* avoid false positive from try-catch in tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants