Sourdface
Sourdface
RReactiflux
Created by Sourdface on 6/9/2023 in #help-js
✅ – ✅ – Sourdface – 05-35 Jun 9
It looks like what I want is setTimeout(() => { /* code */ }, 0)
9 replies
RReactiflux
Created by Sourdface on 6/9/2023 in #help-js
✅ – ✅ – Sourdface – 05-35 Jun 9
Oh. Well ok, I thought that the executor function didn't run until the current event had completed, but apparently it runs in the same stack as the caller. So using Promise in this way won't give me the desired effect.
9 replies
RReactiflux
Created by Sourdface on 6/9/2023 in #help-js
✅ – ✅ – Sourdface – 05-35 Jun 9
What is the actual issue here, and what should I be doing instead?
9 replies
RReactiflux
Created by Sourdface on 6/9/2023 in #help-js
✅ – ✅ – Sourdface – 05-35 Jun 9
The goal is to get the work to be performed outside of the event currently being processed by the js engine's main event loop
9 replies
RReactiflux
Created by Sourdface on 6/9/2023 in #help-js
✅ – ✅ – Sourdface – 05-35 Jun 9
standard.js is telling me I shouldn't use "new Promise()" for side effects because I'm not assigning or returning it.
9 replies