Skip to content

Nextjs 15.0.3 and react 19 throws Cannot update a component (HotReload) while rendering a different component #1294

Closed
@dvarjun

Description

@dvarjun

Describe the bug
After upgrading to nextjs15.0.3 and react 19, custom components in the editor throws console error and here is the stack trace:

Cannot update a component (HotReload) while rendering a different component (Alert). To locate the bad setState() call inside Alert, follow the stack trace as described in https://react.dev/link/setstate-in-render at hook.js:608 Error Component Stack
at ReactNodeView ()
at App (App.tsx:126:36)
at Suspense ()
at LoadableComponent ()
at main ()
at Home ()
at body ()
at html ()
at RootLayout [Server] ()

To Reproduce
Migrate custom blocks example to nextjs environment and browser console

Here is the stackblitz link:
https://stackblitz.com/~/github.com/dvarjun/nextjs15-react19-blocknotejs-bug?view=editor

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