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

Pls make it compatible with react 18 #99

Open
apuatcfbd opened this issue Jul 7, 2022 · 4 comments
Open

Pls make it compatible with react 18 #99

apuatcfbd opened this issue Jul 7, 2022 · 4 comments

Comments

@apuatcfbd
Copy link

No description provided.

@apuatcfbd
Copy link
Author

npm i error

Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"^18.2.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.2" from @animxyz/react@0.6.6
npm ERR! node_modules/@animxyz/react
npm ERR!   @animxyz/react@"^0.6.6" from the root project

@milesingrams
Copy link
Member

I tested with React 18 and it works, I just needed to change the peer dependencies to not throw a warning. Try the latest version and it should work!

@apudiu
Copy link

apudiu commented Jul 28, 2022

@milesingrams as you said, it works only when we install peer deps with npm i --legacy-peer-deps, will this increase bundle size?

@milesingrams
Copy link
Member

The update for @animxyz/react v0.6.7 makes the peer dependencies allow for anything above React 17:

"peerDependencies": {
    "react": ">= 17",
    "react-dom": ">= 17"
  },

I tested this with a React 18 project and I didn't see a warning. Are you using @animxyz/react v0.6.7?

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

No branches or pull requests

3 participants