Skip to content

chore: drop React 17 from supported peer dependency range#2024

Open
unrevised6419 wants to merge 1 commit into
strapi:mainfrom
unrevised6419:chore/drop-react-17
Open

chore: drop React 17 from supported peer dependency range#2024
unrevised6419 wants to merge 1 commit into
strapi:mainfrom
unrevised6419:chore/drop-react-17

Conversation

@unrevised6419

@unrevised6419 unrevised6419 commented Jun 11, 2026

Copy link
Copy Markdown

What

Removes all traces of React 17 from the repo, mirroring strapi/strapi#26194.

  • Tighten react / react-dom peerDependencies to ^18.0.0 (was ^17.0.0 || ^18.0.0) in:
    • @strapi/design-system
    • @strapi/icons
    • @strapi/ui-primitives
  • Remove the React 17 client-only fallback (|| (() => undefined)) and its stale comment from the useId hook. Behavior under React 18 is identical — React.useId is always defined.
  • Add changeset (patch bump for all three packages).

Why

The packages already build and test exclusively against react@18.3.1 (devDependencies) and rely on React 18-only APIs. The ^17 peer range was stale metadata. This is a peer-range correction, not a new behavioral break.

In practice React 17 was already impossible to use: the Strapi Admin entry point itself mounts via the React 18-only createRoot API (render.ts):

import { createRoot } from 'react-dom/client';
// ...
createRoot(mountNode).render(app.render());

So any consumer of this design system is already on React 18. The ^17 peer range only advertised support that could never be exercised.

Notes

devDependencies were already pinned to 18.3.1 — unchanged. No ReactDOM.render / version-check code paths exist in this repo (design-system, not the admin app), so the upstream PR's createRoot/batching notes don't apply to this repo's source.

🤖 Generated with Claude Code

Tighten react/react-dom peerDependencies to ^18.0.0 (was
^17.0.0 || ^18.0.0) across design-system, icons and primitives,
matching the React 18 APIs already in use. Remove the React 17
client-only fallback from the useId hook.

Mirrors strapi/strapi#26194.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

@unrevised6419 is attempting to deploy a commit to the Strapi Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 02c2ede

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@strapi/design-system Patch
@strapi/icons Patch
@strapi/ui-primitives Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b970d4d9-20ca-4a97-a28b-dc87d6216082

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant