You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of the behavior changes in React 19, particularly the ones relevant to StrictMode, can have observable effects when people upgrade (#6040 for example). After spending a little time looking into it, I think the library usage is correct enough, but we should try and write some tests that exercise the issues that StrictMode can cause.
Here are some things I think we should address for React 19:
Add some jobs to CI that run tests against react@beta react-dom@beta (probably unit tests and one platform+browser set of e2e). I think the workspaces make this a little tricky but locally it seemed to work if I upgraded it in each workspace that has a direct dependency on react
$ grep version node_modules/react/package.json
"version": "18.2.0",
$ for x in website devtools playground; do npm -w packages/lexical-$x i react@beta react-dom@beta; done
…
$ grep version node_modules/react/package.json
"version": "19.0.0-beta-b498834eab-20240506",
Scan the library for React usage that should change in the React 19 Upgrade Guide, particularly the StrictMode improvements… but also our tests would need workarounds because act moved with a deprecation warning so we'll need a wrapper for that.
Write new tests that try and exercise potential issues with StrictMode, particularly around LexicalComposer and the function version of editorState, but also other situations where callbacks might be expected and not happen if certain things were initialized in the first pass of the double-render (e.g. editable or rootListener, update, etc.)
Add FAQ entries and/or a usage guide to the lexical react docs that covers how to use (and not use) effects, useLexicalSubscription, etc.
The text was updated successfully, but these errors were encountered:
Some of the behavior changes in React 19, particularly the ones relevant to StrictMode, can have observable effects when people upgrade (#6040 for example). After spending a little time looking into it, I think the library usage is correct enough, but we should try and write some tests that exercise the issues that StrictMode can cause.
Here are some things I think we should address for React 19:
The text was updated successfully, but these errors were encountered: