-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Revert Suspense cache Thenable.catch() change #22280
Revert Suspense cache Thenable.catch() change #22280
Conversation
And used it to import named hooks code. Note this commit currently breaks the test shell.
And changed dynamic import() code to be passed in rather than embedded in the package
Ideally we can remove this param once the Webpack 5 upgrade has finished.
Fixed the actual case of error which was in InspectedElementCache checkForUpdate().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for following up on this, and submitting as a separate PR!
not a big deal, but since the original commit landed against main, wouldn't it be easier to land this revert on main directly, instead of stacking on top #22263? it seems like #22263 only has a simple change on hookNamesCache.js, so i wouldn't expect it to produce any significant merge conflicts, but idk.
in any case, not a big deal, up to you
regarding the changes themselves, so if inspecting the element fails, we don't really show anything in the UI? what does that look like currently?
After taking another look with fresh eyes, I think I see the "uncaught error" issue I initially noticed was here:
did you verify if the case you were seeing before shows up now reported as a console.error
after these changes?
I can land #22263 first then this PR so they are separate.
It will show a red icon with a tooltip that the parsing failed.
Yup! At least it seemed to. If we see another case where it's not handled, let's dig in and figure out how to fix it too 😄 |
Reverts part of facebook#22275 (adding .catch() to Thenables in Suspense caches) in response to facebook#22275 (comment). After taking another look with fresh eyes, I think I see the "uncaught error" issue I initially noticed was in checkForUpdate() (which did not pass an error handler to .then)
Stacks on top of PR #22263 to avoid causing merge conflicts in
hookNamesCache.js
.Compare the two branches only
Reverts part of #22275 (adding
.catch()
to Thenables in Suspense caches) in response to #22275 (comment).After taking another look with fresh eyes, I think I see the "uncaught error" issue I initially noticed was here:
react/packages/react-devtools-shared/src/inspectedElementCache.js
Lines 178 to 195 in 8f96c6b