Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added react@^17.0.0 as a peer dependency #68

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

gragland
Copy link

This PR adds react@^17.0.0 as a peer dependency in order to avoid warnings on projects that use latest versions of React.

This PR adds react@^17.0.0 as a peer dependency in order to avoid warnings on projects that use latest versions of React.
@lukasoppermann
Copy link

Please merge this @donavon as it produces errors

@joyfulelement
Copy link

Hi, while react v18 release is already on horizon in the coming year, curious when this PR can be merged to at least support react v17.x.x? When I try to npm install (npm version: 8.1.2 from LTS version of Node), the following error will be produced.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: 
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"17.0.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0" from [email protected]
npm ERR! node_modules/use-dark-mode
npm ERR!   use-dark-mode@"2.3.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Thanks!

@SevenOutman
Copy link

ping @donavon

@transitive-bullshit
Copy link

I would recommend using this instead as it will work with any future react versions:

  "peerDependencies": {
    "react": ">=16"
  },

@transitive-bullshit
Copy link

Until this gets merged, if anyone wants a workaround, you can use @fisch0920/use-dark-mode from my fork here https://github.com/transitive-bullshit/use-dark-mode

It will work with React 17 and 18.

@pranaynailwal
Copy link

Any updates on this?

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.

6 participants