GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Revert Suspense cache Thenable.catch() change by bvaughn · Pull Request #22280 · react/react

Conversation

@bvaughn

@bvaughn bvaughn commented Sep 9, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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:
https://github.com/facebook/react/blob/8f96c6b2ac3ff0e38f60c87b1f08deb9993526b5/packages/react-devtools-shared/src/inspectedElementCache.js#L178-L195

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Brian Vaughn added 8 commits September 9, 2021 14:16
Brian Vaughn
Added named hooks feature flag to DevToolsFeatureFlags
08c3fcb
Brian Vaughn
Added new dynamic import suspense cache
06fab2d
And used it to import named hooks code.

Note this commit currently breaks the test shell.
Brian Vaughn
Added hookNames entrypoint to react-devtools-inline
b941b03
And changed dynamic import() code to be passed in rather than embedded in the package
Brian Vaughn
Removed named hooks prefetch step since we are using cached network r…
398dacd
…esponses.
Brian Vaughn
Added TODO to follow up on HookNamesModuleLoader param
f4c7df5
Ideally we can remove this param once the Webpack 5 upgrade has finished.
Brian Vaughn
Fixed incorrect path in dynamic import()
22d2eb2
Brian Vaughn
Added instructions to react-devtools-inline README for new import() f…
7c8609d
…actory function
Brian Vaughn
Revert the .catch() around Thenables in DevTools Suspense cache
fd846f1
Fixed the actual case of error which was in InspectedElementCache checkForUpdate().
@bvaughn
bvaughn requested review from gaearon, jstejada and lunaruan September 9, 2021 18:52
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Sep 9, 2021
@bvaughn bvaughn changed the title Added named hooks feature flag to DevToolsFeatureFlags Revert Suspense cache Thenable.catch() change Sep 9, 2021
jstejada
jstejada approved these changes Sep 9, 2021
View reviewed changes

@jstejada jstejada left a comment

Copy link
Copy Markdown
Contributor

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bvaughn

bvaughn commented Sep 9, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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.

I can land #22263 first then this PR so they are separate.

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?

It will show a red icon with a tooltip that the parsing failed.

did you verify if the case you were seeing before shows up now reported as a console.error after these changes?

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 😄

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bvaughn
bvaughn merged commit 96814e7 into react:main Sep 9, 2021
@bvaughn
bvaughn deleted the devtools-suspense-cache-follow-up branch September 9, 2021 19:26
@jstejada jstejada mentioned this pull request Sep 15, 2021
[DevTools] Fix runtime error when inspecting an element times out #22329
Merged
zhengjitf pushed a commit to zhengjitf/react that referenced this pull request Apr 15, 2022
Brian Vaughn @zhengjitf
Revert Suspense cache Thenable.catch() change (react#22280)
ef7fd4e
Reverts part of react#22275 (adding .catch() to Thenables in Suspense caches) in response to react#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)
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
Brian Vaughn
Revert Suspense cache Thenable.catch() change (react#22280)
38a8c8c
Reverts part of react#22275 (adding .catch() to Thenables in Suspense caches) in response to react#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)
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
Brian Vaughn
Revert Suspense cache Thenable.catch() change (react#22280)
835acb2
Reverts part of react#22275 (adding .catch() to Thenables in Suspense caches) in response to react#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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gaearon gaearon Awaiting requested review from gaearon
@lunaruan lunaruan Awaiting requested review from lunaruan
1 more reviewer
@jstejada jstejada jstejada approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@bvaughn @jstejada @facebook-github-bot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.