Downgraded from React 18 back to 17 due to stability issues and problems with .updateScene calls.
See original GitHub issueCoinciding with the upgrade of Obsidian-Excalidraw to React 18 and migrating to ReactDOM.createRoot
for creating the Excalidraw component I’ve been experiencing various random issues. Two in particular
- Excalidraw and/or Obsidian screen going blank on certain operations. One example is this bug: #738.
- Executing multiple
updateScene()
calls within a function results in updateScene calls to be dropped. I can trace back the point in time when it stopped working to the commit when I moved to.createRoot
. #747
I have found that if I space .updateScene()
calls by placing them in separate window.requestAnimationFrame()
calls the updateScene()
issue has gone away, however, the stability issue remained… or rather it could be that the stability issue is caused by requestAnimationFrame()
, however without that I wasn’t able to overcome the issue mentioned in bullet 2.
For now, it seems the downgrade has resolved immediate problems, however, I’d like to understand if I am misusing the package in some way that is leading to the above issues, or if something needs to be changed in the Excalidraw package.
Issue Analytics
- State:
- Created a year ago
- Comments:15 (5 by maintainers)
Top GitHub Comments
It turns out that the issue I encountered in the afternoon was due to an error in the plugin code, not Excalidraw. I fixed the error, since then I’ve not experienced issues with React 18. I’ll continue to use this version of the plugin for few days. If still nothing, then I will close this issue.
@zsviczian so do I understand it that this issue is related to how Obsidian makes specific updates, and thus no action is necessary on our part? If so, let’s close.