Skip to content

Cannot update a component (to2) #552

@mawnir

Description

@mawnir

Describe the bug
Warning: Cannot update a component (to2) while rendering a different component (Editor). To locate the bad setState() call inside Editor

To Reproduce
I don't know the name, but adding [initialContent] to useBlockNote hook trigger the error

const editor: BlockNoteEditor = useBlockNote({
        initialContent:
            initialContent
                ? JSON.parse(initialContent) //as PartialBlock[]
                : undefined,
        ...
    }, [initialContent]);

Misc

  • Node version: v20.10.0
  • Package manager: pnpm
  • Browser: Firefox

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions