Skip to content

Conversation

@YousefED
Copy link
Collaborator

closes #1618

I think this was caused because in React 19, "refs" also quickly remount when in StrictMode.

We didn't correctly cleanup when the editor was unmounted, causing a nested flushSync here

Ideally we add a test for this, but this might be complicated with our setup (the main repo now uses React 18).

@vercel
Copy link

vercel bot commented May 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Jun 20, 2025 9:08am
blocknote-website ✅ Ready (Inspect) Visit Preview Jun 20, 2025 9:08am

@YousefED
Copy link
Collaborator Author

@nperez0111 upon a second look it seems like unmount was added here: ueberdosis/tiptap@8de8e13#diff-9b7c004a70a95a9e7b2b49f3761403a4abfe14fae1490e32c86306794017e27dR171

I suppose the right solution would be to update tiptap and call unmount instead, right?

@YousefED YousefED requested a review from nperez0111 May 29, 2025 20:42
@pkg-pr-new
Copy link

pkg-pr-new bot commented May 29, 2025

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/ariakit@1726

@blocknote/code-block

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/code-block@1726

@blocknote/core

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@1726

@blocknote/mantine

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/mantine@1726

@blocknote/react

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@1726

@blocknote/server-util

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/server-util@1726

@blocknote/shadcn

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/shadcn@1726

@blocknote/xl-ai

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-ai@1726

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-docx-exporter@1726

@blocknote/xl-multi-column

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-multi-column@1726

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-odt-exporter@1726

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-pdf-exporter@1726

commit: 5c6c942

@nperez0111
Copy link
Contributor

@YousefED in the future, yes. But, that is still on their v3 beta so will be part of the larger upgrade to v3. For now, this is a valid fix

@YousefED YousefED marked this pull request as ready for review June 19, 2025 19:18
@nperez0111 nperez0111 merged commit 8fe92ba into main Jun 20, 2025
7 of 8 checks passed
@nperez0111 nperez0111 deleted the fix/react-19-strict branch June 20, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple BlockNote mounted editors cause flushSync errors

3 participants