brainhubeu / react-carousel

A pure extendable React carousel, powered by Brainhub (craftsmen who ❤️ JS)
https://brainhub.eu/
MIT License
1.07k stars 164 forks source link

Support React 17.x #734

Open mneira10 opened 2 years ago

mneira10 commented 2 years ago

Hey! Thanks for such a cool library!

Currently, react-carousel supports up to version 16.8.0 of react. It would be awesome if it would support 17.x!

amymorrisonsky commented 2 years ago

May I ask what issues you ran into?

m99coder commented 2 years ago

If your project uses React 17, an npm install will fail and only succeed with the --legacy-peer-deps flag as follows:

npm ERR! Found: react@17.0.2
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 @brainhubeu/react-carousel@2.0.4
npm ERR! node_modules/@brainhubeu/react-carousel
npm ERR!   @brainhubeu/react-carousel@"^2.0.4" from the root project

Luckily it works out of the box in React 17. Just annoying that you have to use this dangerous flag for installing it.

mhraihan commented 2 years ago

If your project uses React 17, an npm install will fail and only succeed with the --legacy-peer-deps flag as follows:

npm ERR! Found: react@17.0.2
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 @brainhubeu/react-carousel@2.0.4
npm ERR! node_modules/@brainhubeu/react-carousel
npm ERR!   @brainhubeu/react-carousel@"^2.0.4" from the root project

Luckily it works out of the box in React 17. Just annoying that you have to use this dangerous flag for installing it.

I'm facing the same problem :(

mneira10 commented 2 years ago

If your project uses React 17, an npm install will fail and only succeed with the --legacy-peer-deps flag as follows:

npm ERR! Found: react@17.0.2
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 @brainhubeu/react-carousel@2.0.4
npm ERR! node_modules/@brainhubeu/react-carousel
npm ERR!   @brainhubeu/react-carousel@"^2.0.4" from the root project

Luckily it works out of the box in React 17. Just annoying that you have to use this dangerous flag for installing it.

Good to know! It would be better for the peace of mind to install it without the dangerous flag though

christian-pletz commented 2 years ago

If your project uses React 17, an npm install will fail and only succeed with the --legacy-peer-deps flag as follows:

npm ERR! Found: react@17.0.2
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 @brainhubeu/react-carousel@2.0.4
npm ERR! node_modules/@brainhubeu/react-carousel
npm ERR!   @brainhubeu/react-carousel@"^2.0.4" from the root project

Luckily it works out of the box in React 17. Just annoying that you have to use this dangerous flag for installing it.

Same issue here... Please update the dependency configuration.

flokress commented 2 years ago

Would be great if react 17 is supported. please update the dependencies.

Mixomoda commented 2 years ago

Please support react 17.x

edcheyjr commented 2 years ago

Please support react 17.x

yes, please do

thisKeeWord commented 2 years ago

please

EduardoNGomes commented 1 year ago

https://gitmemories.com/sag1v/react-elastic-carousel/issues/235

lsilvahbo commented 1 year ago

Here's the patch for React 17-18 https://www.npmjs.com/package/@itseasy21/react-elastic-carousel

and update your imports.