Skip to content

Better error handling for useBlockNote #342

@infinite-persistence

Description

@infinite-persistence

Describe the bug
useBlockNote currently throws an error when the given initialContent is not kosher.
Handling the error is cumbersome since effects can't be called conditionally. However, it seems like an ErrorBoundary HOC can be a workaround to suppress the error.

image

To Reproduce
Pass a non-json value to initialContent, e.g. initialContent: "abc".
This could come from corrupted saved data.

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