gatsby-plugin-sanity-image icon indicating copy to clipboard operation
gatsby-plugin-sanity-image copied to clipboard

Upgrade to React 18 / Add to Peer Deps?

Open brehen opened this issue 3 years ago • 1 comments

Hi Corey!

We've been using this excellent plugin at our company for some time, our marketing department were stoked when we could finally offer hotspot editing 😎

We've come to the crossroads at our company where we've decided to try to upgrade our projects to React 18, and we'd love to be able to npm install without forcing legacy peer dependencies.

Do you have any plans for upgrading any time soon? Or would you prefer if we forked your repo, did the upgrade and open a Pull Request?

Taking a quick scan of your plugin, I noticed that there's one occurrence of useEffect, which has been altered slightly in the new React version. Not sure if it has any implications for this implementation though 🤔 (https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html#other-breaking-changes)

brehen avatar Jun 14 '22 10:06 brehen

I don't anticipate any issues using it with React 18 as-is, but I'd prefer to be a bit conservative w/r/t updating the stated compatibility to avoid inadvertently creating a headache in the case there is something incompatible. I'm watching as Gatsby support for React 18 becomes more stable, and once it does I can test and update as appropriate.

coreyward avatar Jun 15 '22 20:06 coreyward

This was fixed in 9b1d3ec926f4432ae5d7b23dfaa8d8cdeaaadf89 and released in v0.12.0.

coreyward avatar Aug 24 '22 16:08 coreyward