-
Our SetupOur application uses React + Lexical + RichText in two distinct modes:
For Viewer mode, we are naturally exploring use of the @lexical/headless package. We also implement a number of custom DecoratorNodes. The Because Next.js supports recent React features to manage the server-client boundary and client side hydration, we cannot (simply) render to some string in the server environment. We need to defer to the Next.js rendering strategy here. Our use of third party components in DecoratorNodes also means we don't have full control of DOM representations. Our ProblemWe haven't been able to figure out how to use a Headless Lexical editor that will defer to the Next.js / React management of the server-client boundary. My impression, which might be incorrect, is that Lexical gives us two sort of rigid choices that don't really permit the more nuanced strategy offered by RSCs: render everything on the server (typically to some string), or render everything on the client. Intuitively what I'm looking for is something akin to Are there recommended patterns or examples that can help us understand how, on the server, to combine Next.js / React RSC rendering of components with Lexical? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Lexical does not currently have any facilities to make it easy to use RSC, you'd have to build it and contribute it or wait for someone else to get around to it. |
Beta Was this translation helpful? Give feedback.
Lexical does not currently have any facilities to make it easy to use RSC, you'd have to build it and contribute it or wait for someone else to get around to it.