An Interest In:
Web News this Week
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
April 14, 2022 03:38 pm GMT
Original Link: https://dev.to/alecmce/synchronous-rendering-3k3a
Synchronous Rendering
I have a WebGL context that updates on a frame-loop, within a broader React application.
I want to create a second React application to overlay an SVG element above the WebGL context, but critically I need this SVG element to update synchronously in the same frame that the WebGL context renders.
I understand that in most cases asynchronous rendering is a feature not a bug, but in my use-case, I need frame-by-frame integration between the WebGL update cycle and the SVG DOM updates.
It doesn't look like this is possible. flushSync
forces updates, but doesn't force rendering. Is there a renderNow
or similar function hiding in the React API?
Thanks in advance, Alec
Original Link: https://dev.to/alecmce/synchronous-rendering-3k3a
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To