Skip to content

chore(react): upgrade to v19 - #4616

Merged
thetaPC merged 3 commits into
mainfrom
FW-6462-v3
Aug 5, 2026
Merged

chore(react): upgrade to v19#4616
thetaPC merged 3 commits into
mainfrom
FW-6462-v3

Conversation

@thetaPC

@thetaPC thetaPC commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Issue URL: internal

What is the current behavior?

The site runs React 18.2 and Docusaurus 3.7.0. Several things block or complicate a React 19 upgrade:

  • npm ci reports an unmet React peer dependency. @docusaurus/plugin-debug@3.7.0 pins react-json-view-lite: ^1.2.0, and no 1.x release of that package supports React 19.
  • @prismicio/react@2 declares peerDependencies: { react: "^18" }, which makes npm install fail with ERESOLVE on React 19.
  • Playground tooltips use @tippyjs/react, unmaintained since April 2022. It reads children.ref, which React 19 removed, logging "Accessing element.ref was removed in React 19" on pages with playgrounds.
  • The lockfile resolves react-helmet-async to the upstream package even though @docusaurus/types declares the npm:@slorber/react-helmet-async alias. Only that fork supports React 19, so this has been installing the wrong package since the 3.7 upgrade.

What is the new behavior?

React 19.2.8 and Docusaurus 3.10.2, with npm ci running clean and zero React peer violations across the tree.

React 19

  • react, react-dom to 19.2.8 and @types/react to 19
  • @prismicio/react to 3 and @prismicio/client to 7, which renames getEndpoint to getRepositoryEndpoint
  • Replaced @tippyjs/react with @floating-ui/react (maintained by Tippy's own author) behind a shared Tooltip component
  • Corrected the stale react-helmet-async lockfile entry to the aliased fork
  • Type updates for React 19: the removed global JSX namespace (JSX.Element to ReactNode, custom elements declared via module augmentation) and ReactElement props defaulting to unknown

Docusaurus 3.10.2

  • All six root @docusaurus/* packages bumped together so the family stays on one version. This brings react-json-view-lite to 2.5.0 and clears the last peer warning.
  • Ported three swizzled components to their 3.10.2 sources: Layout (removed useKeyboardNavigation, added ThemeClassNames.layout.main.container), EditMetaRow (upstream noPrint so the edit link is hidden when printing), and LocaleDropdownNavbarItem (upstream useLocaleDropdownUtils refactor)
  • Migrated the deprecated onBrokenMarkdownLinks to markdown.hooks.onBrokenMarkdownLinks
  • Adapted _search.scss to DocSearch v4, which applies all: unset to the search button and therefore discards the ambient box-sizing, plus restyles the border, background variable, and shortcut keys
  • Gave PlaygroundTabs its own TabItem, since @theme/TabItem now requires Docusaurus's tabs context and threw "useTabsContext() must be used within a Tabs component" on component pages

Does this introduce a breaking change?

  • Yes
  • No

Other information

Preview

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
ionic-docs Ready Ready Preview Aug 5, 2026 5:55pm

Request Review

@thetaPC
thetaPC marked this pull request as ready for review August 4, 2026 23:06
@thetaPC
thetaPC requested a review from a team as a code owner August 4, 2026 23:06
@thetaPC
thetaPC requested a review from OS-jacobbell August 4, 2026 23:06

@ShaneK ShaneK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me, I just had some suggestions

Comment thread src/styles/components/_search.scss Outdated
<div
id={SkipToContentFallbackId}
className={clsx(ThemeClassNames.wrapper.main, styles.mainWrapper, wrapperClassName)}
className={clsx(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The README in this folder says swizzled components should go in the prettier ignore so they stay diffable against upstream, but only DocItem and DocRoot actually made it in there. So this file gets reformatted to repo style, which I think is most of the reason these three had to be hand-transcribed from upstream instead of applied as a patch. Telling that DocItem/Layout is the one that kept upstream formatting and also the one that needed no work this time.

Might be worth adding the rest of the swizzle dirs to .prettierignore so the next Docusaurus bump is closer to a mechanical diff. Follow-up though, definitely not this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@thetaPC
thetaPC merged commit 1e952fc into main Aug 5, 2026
4 checks passed
@thetaPC
thetaPC deleted the FW-6462-v3 branch August 5, 2026 18:00
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.

2 participants