sanity icon indicating copy to clipboard operation
sanity copied to clipboard

Support for react@18?

Open ale917k opened this issue 2 years ago • 1 comments

I understand react v18 was "only" released over 4 months ago, but it would be nice if support was rolled out given there are not many breaking changes introduced.

In my case I'd like to maintain the latest Next.js features while taking advantage of Yarn workspaces, so I'll have to enforce v18 also for the Sanity Studio (which as a FYI doesn't seem to break any functionality).

The only thing that would bother me at this point would be the constant warning log:

[WARN] The following package versions have not yet been marked as supported:

  react (installed: 18.2.0, want: ^16.9 || ^17)
  react-dom (installed: 18.2.0, want: ^16.9 || ^17)

You _may_ encounter bugs while using these versions.

  To downgrade, run either:

  yarn add "[email protected]" "[email protected]"

  or

  npm install "[email protected]" "[email protected]"

Alternatively, if support to new versions need to take much longer, can we consider placing the log upon installation rather than at each sanity start?

ale917k avatar Jul 30 '22 15:07 ale917k

Hi Alessio!

We are working on full support for React 18, but we are not quite there yet :)

Stay tuned!

rexxars avatar Aug 08 '22 21:08 rexxars

Any update on that?

wdtamagi avatar Oct 04 '22 16:10 wdtamagi

Any news on this?

scerelli avatar Oct 26 '22 13:10 scerelli

Sanity Studio v3 will support React 18. It's currently released as [email protected]. More info here.

mariuslundgard avatar Oct 26 '22 13:10 mariuslundgard

@mariuslundgard ye i know this, but upgrading to V3 means we got to deal with breaking changes, do you already have a migration guide or even a draft of it?

scerelli avatar Oct 31 '22 13:10 scerelli

@scerelli The migration docs are here: https://beta.sanity.io/docs/platform/studio/v2-to-v3.

Please reach out in the GitHub discussions or in our community Slack if you have questions or suggestions along the way.

mariuslundgard avatar Oct 31 '22 13:10 mariuslundgard

Sanity Studio v3 is now released with full React 18 support.

rexxars avatar Dec 12 '22 23:12 rexxars