playroom
playroom copied to clipboard
React 18 support
Playroom does not support React 18 dependencies. It would be greate to add this support.
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.
@michaeltaranto Greate news! Thank you!
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.
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.
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).
https://github.com/seek-oss/playroom/pull/265