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

React 18 support #261

Closed
Moranilt opened this issue Jun 22, 2022 · 5 comments · Fixed by #265
Closed

React 18 support #261

Moranilt opened this issue Jun 22, 2022 · 5 comments · Fixed by #265

Comments

@Moranilt
Copy link

Playroom does not support React 18 dependencies. It would be greate to add this support.

@michaeltaranto
Copy link
Contributor

Yep, started on this a few weeks ago but had to park for a bit. Was playing around with the approach, trying to avoid config if possible.

I'll loop back.

@Moranilt
Copy link
Author

@michaeltaranto Greate news! Thank you!

@mogularpb
Copy link

any news on this? React is no longer required to be imported into components, and in fact recent typescript linting changes mean that you will get an error when you are importing react. However this then breaks playroom.

@michaeltaranto
Copy link
Contributor

Picked this up again between tasks and thought i'd share an update:

  • Added support for React 18, with backwards compatibility and zero config (drawing inspiration from Storybooks implementation)
  • The editor package (react-codemirror2) seems to be no longer updated and uses legacy React lifecycle APIs which are no longer supported.
  • Started working on migration to Codemirror 6, which is non-trivial requiring all features to be rewired to suit their new extension architecture.

Really want to get this work through, but our effort is definitely focused elsewhere in our ecosystem due to company priorities. I'll try to keep this issue updated.

@michaeltaranto
Copy link
Contributor

Actually, pivoted on this one. Given React still lets you use legacy lifecycle APIs, we have taken in a copy of the editor as a temporary workaround, while we look at upgrading to CodeMirror 6 separately.

This allows us to support React 18 (with backwards compatibility and no config/api change).

#265

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

Successfully merging a pull request may close this issue.

3 participants