-
-
Notifications
You must be signed in to change notification settings - Fork 197
Unexpected Behavior with State Changes in @typefox/monaco-editor-react 6.6.0 #898
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
Comments
#897 seems to confirm the second part of this issue. |
@pbrostean thank you. I will catch up with answering / looking into issues this week. Was occupied with other things last two weeks. |
@pbrostean I can re-produce the problem, but don't yet know why it happens. It is not completely broken, because it works for example here: https://typefox.github.io/monaco-languageclient/ghp_react_statemachine.html |
@pbrostean PR will come likely tomorrow. It is combination of not initialized model references in certain situations (wrapper) and wrong handling of onLoad in the useEffect (wrapper-react). Need to align tests and add new ones. |
@pbrostean PR #904 is up. It fixes way more than this problem, but it became necessary. |
With the latest version of
@typefox/monaco-editor-react
(6.6.0) and the corresponding packages according to the compatibility table, there is an unexpected behavior in the component when state changes occur. Previously, the following usage was not an issue:However, since the update, all state changes lead to the following error:
This is followed by a re-initialization of the editor.
Additionally, the newly introduced
automaticallyDispose
option inwrapperConfig
does not provide the expected solution forReact.StrictMode
. The editor is still initialized and rendered twice. However, settingautomaticallyDispose
tofalse
now results in the application functioning as expected, with only one instance of the editor existing (despite an error being logged in the console):automaticallyDispose=true

automaticallyDispose=false

The text was updated successfully, but these errors were encountered: