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 — [Fresh] Update the list of built-in hooks by damianstasik · Pull Request #27864 · react/react

Conversation

@damianstasik

@damianstasik damianstasik commented Dec 29, 2023

Copy link
Copy Markdown
Contributor

Summary

I've noticed that list of built-in hooks inside react-refresh is a bit outdated. This makes react-refresh handle them as if they were custom hooks, like in the example of generated code below:

var _s2 = $RefreshSig$();
// ...
_s2(App, "bfyXHsONnHV5LIn00sGBmBnlbi4=", false, function() {
  return [useTransition, useId, useCustomHook];
});

This PR updates the list with hooks from both the stable and canary release.

How did you test this change?

I've updated react-refresh in a Vite project and I've confirmed that these hooks no longer were treated as custom hooks.

Sorry, something went wrong.

Uh oh!

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

simon-robertson-shift reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@damianstasik
Update the list of built-in hooks in react-refresh
a472fd8
@facebook-github-bot

facebook-github-bot commented Dec 29, 2023

Copy link
Copy Markdown
Contributor

Hi @damianstasik!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

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

@react-sizebot

react-sizebot commented Dec 29, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Comparing: 95ec128...1f2fe14

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 176.57 kB 176.57 kB = 55.00 kB 55.00 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 178.69 kB 178.69 kB = 55.64 kB 55.64 kB
facebook-www/ReactDOM-prod.classic.js = 591.32 kB 591.32 kB = 104.34 kB 104.34 kB
facebook-www/ReactDOM-prod.modern.js = 575.08 kB 575.08 kB = 101.43 kB 101.43 kB
oss-experimental/react-refresh/cjs/react-refresh-babel.production.min.js +4.85% 8.16 kB 8.56 kB +3.41% 2.79 kB 2.88 kB
oss-stable-semver/react-refresh/cjs/react-refresh-babel.production.min.js +4.85% 8.16 kB 8.56 kB +3.41% 2.79 kB 2.88 kB
oss-stable/react-refresh/cjs/react-refresh-babel.production.min.js +4.85% 8.16 kB 8.56 kB +3.41% 2.79 kB 2.88 kB
test_utils/ReactAllWarnings.js Deleted 67.56 kB 0.00 kB Deleted 16.59 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-refresh/cjs/react-refresh-babel.production.min.js +4.85% 8.16 kB 8.56 kB +3.41% 2.79 kB 2.88 kB
oss-stable-semver/react-refresh/cjs/react-refresh-babel.production.min.js +4.85% 8.16 kB 8.56 kB +3.41% 2.79 kB 2.88 kB
oss-stable/react-refresh/cjs/react-refresh-babel.production.min.js +4.85% 8.16 kB 8.56 kB +3.41% 2.79 kB 2.88 kB
oss-experimental/react-refresh/cjs/react-refresh-babel.production.js +1.91% 26.61 kB 27.12 kB +1.51% 5.91 kB 6.00 kB
oss-stable-semver/react-refresh/cjs/react-refresh-babel.production.js +1.91% 26.61 kB 27.12 kB +1.51% 5.91 kB 6.00 kB
oss-stable/react-refresh/cjs/react-refresh-babel.production.js +1.91% 26.61 kB 27.12 kB +1.51% 5.91 kB 6.00 kB
oss-experimental/react-refresh/cjs/react-refresh-babel.development.js +1.89% 26.83 kB 27.34 kB +1.56% 5.96 kB 6.06 kB
oss-stable-semver/react-refresh/cjs/react-refresh-babel.development.js +1.89% 26.83 kB 27.34 kB +1.56% 5.96 kB 6.06 kB
oss-stable/react-refresh/cjs/react-refresh-babel.development.js +1.89% 26.83 kB 27.34 kB +1.56% 5.96 kB 6.06 kB
test_utils/ReactAllWarnings.js Deleted 67.56 kB 0.00 kB Deleted 16.59 kB 0.00 kB

Generated by 🚫 dangerJS against 1f2fe14

All reactions

Sorry, something went wrong.

Uh oh!

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

@facebook-github-bot facebook-github-bot added the CLA Signed label Dec 30, 2023
damianstasik added 3 commits January 16, 2024 23:31
@damianstasik
Merge branch 'facebook:main' into update-react-refresh-builtin-hooks
0775496
@damianstasik
Merge branch 'main' into update-react-refresh-builtin-hooks
a498588
@damianstasik
Merge branch 'main' into update-react-refresh-builtin-hooks
1f2fe14
eps1lon
eps1lon approved these changes Feb 6, 2024
View reviewed changes

@eps1lon eps1lon left a comment

Copy link
Copy Markdown
Collaborator

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.

Thank you!

Sorry, something went wrong.

Uh oh!

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

damianstasik reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@eps1lon eps1lon changed the title Update the list of built-in hooks in react-refresh [Fresh] Update the list of built-in hooks Feb 6, 2024
@eps1lon
eps1lon merged commit 7cbd026 into react:main Feb 6, 2024
github-actions Bot pushed a commit that referenced this pull request Feb 6, 2024
@eps1lon
[Fresh] Update the list of built-in hooks (#27864)
d1b0b96
DiffTrain build for [7cbd026](7cbd026)
@ztanner ztanner mentioned this pull request Feb 9, 2024
Update React from 2bc7d336a to ba5e6a832 vercel/next.js#61837
Merged
huozhi pushed a commit to vercel/next.js that referenced this pull request Feb 9, 2024
@ztanner
Update React from 2bc7d336a to ba5e6a832 (#61837)
f165514
Updates React from 2bc7d336a to ba5e6a832.

### React upstream changes

- react/react#28283
- react/react#28280
- react/react#28079
- react/react#28233
- react/react#28276
- react/react#28272
- react/react#28265
- react/react#28259
- react/react#28153
- react/react#28246
- react/react#28218
- react/react#28263
- react/react#28257
- react/react#28261
- react/react#28262
- react/react#28260
- react/react#28258
- react/react#27864
- react/react#28254
- react/react#28219
- react/react#28248
- react/react#28216
- react/react#28249
- react/react#28241
- react/react#28243
- react/react#28253
- react/react#28256
- react/react#28236
- react/react#28237
- react/react#28242
- react/react#28251
- react/react#28252

Closes NEXT-2411
@ztanner ztanner mentioned this pull request Mar 19, 2024
(backport) Update React from 60a927d04 to 14898b6a9 vercel/next.js#63442
Closed
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
@damianstasik @AndyPengc12
[Fresh] Update the list of built-in hooks (react#27864)
7301686
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
@eps1lon
[Fresh] Update the list of built-in hooks (#27864)
3076c11
DiffTrain build for commit 7cbd026.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@damianstasik
[Fresh] Update the list of built-in hooks (react#27864)
7cca885
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@eps1lon eps1lon eps1lon approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

CLA Signed

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.

4 participants

@damianstasik @facebook-github-bot @react-sizebot @eps1lon
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.