-
-
Notifications
You must be signed in to change notification settings - Fork 555
Using blocknote option initialContent
creates a flushSync in console
#1513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
BlockNote has it's own React rendering, so it is not related to Tiptap. Luckily, this is being emitted as an error, but React will do the right thing anyway. Let's just keep this issue tracked, but it probably won't be worked on anytime soon, since it is rather complicated to get right. |
Thanks for the report, this must be a regression after #1438 - we'll look into it |
Hello @YousefED, thanks a lot for your fix but I still get the error in my project and in the sandbox I shared : https://stackblitz.com/edit/github-5zwbkwwx?file=App.tsx |
the package-lock still has an old blocknote version, please test on the latest |
You're right I though the "latest" was enough but when I specify the precise 0.26.0 version it does work on the sandbox. |
I still meet this error when using the latest 0.26.0 version |
@edwandr in the example you're displaying the same editor in 3 different views. Don't you want to use 3 different editors? You're right that in this case the warning gets triggered, but it's a pretty niche scenario I think |
To add, this issue occurred when I was using the custom block. Only when the document contains one or more custom blocks, the error occurs each time I refresh the page and reload blocknote view.
|
Yes indeed in the sandbox it's three time the same editor but in my app it's different editors (one component for each comments) and I still get the issue. |
@YousefED I'm also running into this case, we render several different editors on our page at once and also see the flushSync errors. Happy to open a new issue to track if that's easier. |
Can confirm this is happening for me with custom blocks. If I remove the custom blocks the error goes away.
|
This happens to me because of the second render in dev. Thus when I disable the strict mode, i don't get the warning anymore. |
Will be fixed in #1726 |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I'm trying to initiate a blocknote with
initialContent
that features a custom inline (a mention) content usinguseCreateBlockNote
hook. When doing so, it works well but I get an error in console (see screenshot)It seems to be a tiptap issue that is not really fixed yet : ueberdosis/tiptap#3764
There are partial solutions using microtasks though found by community :
To Reproduce
Misc
The text was updated successfully, but these errors were encountered: