Skip to content

useEditorEffect returns stale view properties on first render #86

@konstantinruge

Description

@konstantinruge

Hey - it's me again! 😄 Another subtle issue regarding the ReactEditorView.

We have a non-editable editor that uses node views. These node views have logic that depends on the view.editable prop, which is accessed inside useEditorEffect. We noticed that this property is stale and shows an incorrect value on the first render cycle.

CleanShot.2024-01-30.at.12.05.48.mp4

It would be great if this could be fixed so that either we have the correct values immediately or a view parameter that is null initially to indicate that the correct state is still pending.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions