davidhu2000 / react-spinners

A collection of loading spinner components for react
https://www.davidhu.io/react-spinners
MIT License
3.01k stars 262 forks source link

Support React 18 #463

Closed nikeee closed 2 years ago

nikeee commented 2 years ago

React 18 released: https://github.com/facebook/react/releases/tag/v18.0.0

Is this library compatible with React 18 despite the warning that's currently printed when installing react-spinners?

adrianmanduc commented 2 years ago

Any update on this ?

RubenVerster commented 2 years ago

Use this, please npm install --save react-spinners --legacy-peer-deps

You might have to run this as well npm i react-dom --legacy-peer-deps

And just to be safe, run npm i

Do you guys like not google or check your consoles or something...

nikeee commented 2 years ago

Yes, that might work. However, as seen in your instructions, --legacy-peer-deps uses a legacy mode, which should be avoided. Fixing this upstream would be appropriate.

There is a PR for upgrading the dependency: #464

davidhu2000 commented 2 years ago

try 0.12.0-alpha.3 and see if the issue is resolved

davidhu2000 commented 2 years ago

oof, this might be more compcliated than expected given enzyme doesn't have an adapter for react 18

RubenVerster commented 2 years ago

Yes, that might work. However, as seen in your instructions, --legacy-peer-deps uses a legacy mode, which should be avoided. Fixing this upstream would be appropriate.

There is a PR for upgrading the dependency: #464

I know man... but this is the current fix for the issue right now Once the PR has been merged in, they will come and tell us that the issue has an official fix :P

aperalta1431 commented 2 years ago

I appreciate the above solution but it should be avoided. Besides the above solution involves making changes to the pipeline to support such legacy mode if we still want to proceed with it which is not suitable in an enterprise setting. Nonetheless, the library is a time saver and I will be waiting for an update on this.

Ali-Aref commented 2 years ago

any updates ?

davidhu2000 commented 2 years ago

v0.12.0 is released with react 18 support