Skip to content

Upgrade react#7925

Open
theEquinoxDev wants to merge 3 commits intowebpack:mainfrom
theEquinoxDev:upgrade-react
Open

Upgrade react#7925
theEquinoxDev wants to merge 3 commits intowebpack:mainfrom
theEquinoxDev:upgrade-react

Conversation

@theEquinoxDev
Copy link
Contributor

@theEquinoxDev theEquinoxDev commented Mar 5, 2026

Upgrade React to v19

Closes #7920

What changed

Dependencies upgraded

  • react and react-dom: 17.0.2 -> 19.1.0
  • react-tiny-popover: 5 -> 8.1.6
  • react-helmet-async: 2.0.5 -> 3.0.0
  • @react-spring/web: 9.7.5 -> 10.0.3

react-visibility-sensor removed
This package uses ReactDOM.findDOMNode(), which was removed in React 19. Both
Contributors.jsx and Support.jsx now use the native IntersectionObserver API
to achieve the same lazy-load behavior, with no additional dependencies.

SidebarItem.jsx refactored
Converted from a class component to a functional component to eliminate the
UNSAFE_componentWillReceiveProps lifecycle method, which React 19 no longer supports.

index.jsx updated
Replaced the legacy ReactDOM.render / ReactDOM.hydrate calls with createRoot and
hydrateRoot from react-dom/client, as required by React 18+.

server.jsx updated
react-helmet-async v3 with React 19 no longer populates the helmet context during
SSR (React 19 handles head tags natively). Added a null guard to prevent a crash in
the static site generator.

Configuration/components.js updated
react-tiny-popover v8 switched to a named export and renamed the position prop to
positions. Updated the import and JSX accordingly.

package.json scripts fixed
rimraf v6 requires an explicit --glob flag for glob patterns. Two scripts
(clean and clean-printable) were missing this flag, causing them to silently do
nothing on Node 20+.

Testing

  • npm start - dev server runs cleanly, no React warnings in the browser console
  • npm run build - production and SSG builds complete successfully
  • npm run jest - all 27 tests pass

Let me know if anything needs changing or if I missed something.

@vercel
Copy link

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-js-org Ready Ready Preview, Comment Mar 5, 2026 9:08pm

Request Review

background-color: #2f85d0;
}

/* Success */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid these changes, it is only about react, not styles

? `${supporter.name || supporter.slug}'s avatar`
: "avatar")
}
onError={this._handleImgError}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this was just removed?

"clean-printable": "rimraf --glob src/content/**/printable.mdx",
"preclean": "run-s clean-dist clean-printable",
"clean": "rimraf src/content/**/_*.mdx src/**/_*.json repositories/*.json",
"clean": "rimraf --glob src/content/**/_*.mdx src/**/_*.json repositories/*.json",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why they was added?

@alexander-akait
Copy link
Member

Also please reabase

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.

update react to the latest version

2 participants