Skip to content

Make react-dom optional - #5603

Merged
quantizor merged 3 commits into
styled-components:mainfrom
lucaswitch:patch-1
Jan 16, 2026
Merged

quantizor merged 3 commits into
styled-components:mainfrom
lucaswitch:patch-1

Conversation

@lucaswitch

@lucaswitch lucaswitch commented Sep 5, 2025 •

Copy link
Copy Markdown
Contributor

Solves the npm install problem on react-native enviroments. npm warn Could not resolve dependency:
npm warn peer react@"^19.1.1" from [email protected] npm warn node_modules/react-dom
npm warn peer react-dom@">= 16.8.0" from [email protected]
npm warn node_modules/styled-components


Note

Adjusts peer dependencies to reduce installation friction, especially for React Native.

  • Mark react-dom as optional via peerDependenciesMeta in packages/styled-components/package.json
  • Remove unnecessary @types/react and @types/react-dom from peerDependencies
  • Add a changeset marking a patch release for styled-components

Written by Cursor Bugbot for commit 519fe91. This will update automatically on new commits. Configure here.

@changeset-bot

changeset-bot Bot commented Sep 5, 2025 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 519fe91

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

This PR includes changesets to release 1 package
Name Type
styled-components 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

@quantizor quantizor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Makes sense, can you add a changeset please?

lucaswitch and others added 2 commits January 16, 2026 00:01
Solves the npm install problem on react-native enviroments.
npm warn Could not resolve dependency:
npm warn peer react@"^19.1.1" from [email protected]
npm warn node_modules/react-dom
npm warn   peer react-dom@">= 16.8.0" from [email protected]
npm warn   node_modules/styled-components

@quantizor quantizor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you!

@quantizor
quantizor merged commit 55d05c1 into styled-components:main Jan 16, 2026
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