You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using glslCanvas within a react app and am failing to cleanly destroy the instance.
It appears the render loop does not get aborted so causes an error after the destruction?
My hook looks like this:
// Spawn the glsl canvasuseEffect(()=>{if(!webGlSupported&&GlslCanvas)return;sandbox.current=newGlslCanvas(canvas.current);return()=>{sandbox.current.pause();sandbox.current.destroy();};},[webGlSupported]);
This causes an error:
Uncaught TypeError: Cannot read property 'canvas' of null
at GlslCanvas.resize (GlslCanvas.es.js:1394)
at RenderLoop (GlslCanvas.es.js:1084)
I'm using
glslCanvas
within a react app and am failing to cleanlydestroy
the instance.It appears the render loop does not get aborted so causes an error after the destruction?
My hook looks like this:
This causes an error:
Related: #8
The text was updated successfully, but these errors were encountered: