question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Downgraded from React 18 back to 17 due to stability issues and problems with .updateScene calls.

See original GitHub issue

Coinciding 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

  1. Excalidraw and/or Obsidian screen going blank on certain operations. One example is this bug: #738.
  2. 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:open
  • Created a year ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
zsvicziancommented, Nov 27, 2022

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.

0reactions
dwellecommented, Dec 20, 2022

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Downgraded from React 18 back to 17 due to stability issues and ...
Excalidraw and/or Obsidian screen going blank on certain operations. One example is this bug: #738. Executing multiple updateScene() calls within a function ...
Read more >
How to downgrade from react 18 to 17.0.2 - DEV Community ‍ ‍
1. Create React App · 2. Uninstall react and react-dom · 3 Install react 17 and react-dom 17 · 4 Change index.js ·...
Read more >
How do you downgrade from React 18 to React 17?
When I run "npm start", I get the error "Module not found: Can't resolve 'react-dom/client'" in the terminal. I also deleted the package-lock....
Read more >
How to Upgrade to React 18
In this post, we will guide you through the steps for upgrading to React 18. Please report any issues you encounter while upgrading...
Read more >
How to solve Error: Can't resolve 'react-dom/client ... - YouTube
... resolve ' react -dom/client' when downgrading from React 18 to 17 ... you how to resolve the error : 'Module not found:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found