required for syntax highlighting, accesses window when imported. To disable SSR when loading, next/dynamic is used in NextJS, and it does not even load the extension, Remix can use lazy from React, but it straight doesnt work as it isnt a top level import.
import { MonacoEditorReactComp } from '@typefox/monaco-editor-react';
accesses window when imported, so I cant tuck the component in <ClientOnly /> at Remix, and I cant add the import before <ClientOnly /> because outside of <ClientOnly /> there is no way to know if we are in SSR right now. Same applies for NextJS.
I can pile up tons of examples like this, almost every codingame library accesses window when imported. I have spent at least 8+ hours on trying to make everything work with Remix, but in the end it always ends up in messy hacks that doesnt even guarantee working.
sooo, I think, a small warning to the readme should be added like
"server side rendering might not work"
until a sane way to run with SSR is found and submitted in packages/examples.
@CGNonofr and @caner-cetin any idea how this should be done/implemented? Of course, we can state it in the README.md: Should there be some warning at build or runtime (if that is even possible)
maybe there is a warning and I havent seen it, but server side rendering breaks everything completely. I have only tried with NextJS, Remix.
required for syntax highlighting, accesses window when imported. To disable SSR when loading,
next/dynamic
is used in NextJS, and it does not even load the extension, Remix can uselazy
from React, but it straight doesnt work as it isnt a top level import.accesses window when imported, so I cant tuck the component in
<ClientOnly />
at Remix, and I cant add the import before<ClientOnly />
because outside of<ClientOnly />
there is no way to know if we are in SSR right now. Same applies for NextJS.I can pile up tons of examples like this, almost every codingame library accesses window when imported. I have spent at least 8+ hours on trying to make everything work with Remix, but in the end it always ends up in messy hacks that doesnt even guarantee working.
sooo, I think, a small warning to the readme should be added like
"server side rendering might not work"
until a sane way to run with SSR is found and submitted in packages/examples.
ty