TypeFox / monaco-languageclient

Repo hosts npm packages for monaco-languageclient, vscode-ws-jsonrpc, monaco-editor-wrapper, @typefox/monaco-editor-react and monaco-languageclient-examples
https://www.npmjs.com/package/monaco-languageclient
MIT License
1.05k stars 178 forks source link

@typefox/monaco-editor-react does not work with React StrictMode enabled #631

Closed zzullick closed 5 months ago

zzullick commented 5 months ago

Hi, I was looking to adopt your React wrapper for Monaco to use the language client services. An issue I ran into was, whenever <StrictMode> was enabled in React, the editor would fail to load properly and initialize the model. If you remove <StrictMode>, it works as expected.

I've reproduced the issue in a codesandbox for your review/testing..

kaisalmen commented 5 months ago

Hi @zzullick thanks for reporting. We need to fix. It was already brought up some time ago, but know I have an idea what could be the root cause. I will work on a fix in the upcoming days.