Closed cdietrich closed 5 months ago
Hi @cdietrich did you await everything properly. There is a safe-guard for this during init. It works, see: https://github.com/TypeFox/monaco-components/blob/main/packages/examples/src/langium/wrapperStatemachine.ts
... or is this working for the wrapper and not for the react component? Then this is a new issue.
We are using the react component yes
@cdietrich are you using strict mode? That will trigger a 2x render, and it will make impurity issues pretty evident.
am not in strict mode. with having the component only once i dont see the problem
can also see it here in reactTs.tsx when duping the component
@cdietrich seems to be a bug we need to fix. Thanks for reporting.
Fixed will be contained in next release (see https://github.com/TypeFox/monaco-languageclient/pull/600) https://github.com/TypeFox/monaco-languageclient/pull/600/commits/9f49bea75114cf0785f12cb0d3bbde03d08604af
Update preview releases will come in a few minutes...
@kaisalmen in my example this still does not seem to work. https://github.com/cdietrich/my-monaco-editor-react-example/blob/660e1b2cd3f189bd26e9ef1804e54090f4b49e83/src/main.tsx#L7
replace this with
@kaisalmen maybe this one slipped through too
looks better now, but somehow the two editors seem to talk to the same language client. but maybe also problem on my side.
does not look like https://github.com/cdietrich/my-monaco-editor-react-example/tree/cd_twiceDoesStillNotWork
the two editors seem to talk to the same language client. but maybe also problem on my side.
There is TypeFox/monaco-languageclient#620 that is still unresolved. If you have two editor configured with the same languageId you run into this problem.
thx for the heads up. a quick change of the 2nd language id does not seem to help
@cdietrich ok, we need to fix/implement a solution for TypeFox/monaco-languageclient#620 I will now move all open issues to the other repo.
Hi, do you have a hint how to have the component twice on a page. am currently getting