Skip to content

[Discussion] SSR and Lexical #1177

@zurfyx

Description

@zurfyx

An NPM user mentioned he's having trouble using Lexical with Remix because of SSR. In particular, window is not defined on the server-side where the module is loaded.

  1. window is usually a best practice in Meta. Do we want to stick with with it and force frameworks to fix window themselves? Or do we want to drop the prefix?
  2. What steps are we taking to prevent the text content from being editable before the module and up and running on the client? On WWW we sometimes use to readOnly flag to regulate this (even though I'm not very sure it's fixing the whole thing).

Not sure if either of this can/should be simplified on the Lexical side but we should at least document how to work around this as it's a common use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions