After causing an exception in an effect an app will continue to render, however, subsequent useEffect calls queue but do not fire.
With a little investigation it appears that the afterPaint function is getting into a weird state. The effects continue to get queued up so the length is never one and thus flushAfterPaintEffects is not called (while tracing in my actual code the raf always appeared to be undefined).
Here's a codesandbox reproducing the issue and has some further exposition.
Note: codesandbox seems to have issues resolving preact/compat sometimes. Hard reload the sandbox when this happens
After causing an exception in an effect an app will continue to render, however, subsequent
useEffectcalls queue but do not fire.With a little investigation it appears that the
afterPaintfunction is getting into a weird state. The effects continue to get queued up so the length is never one and thusflushAfterPaintEffectsis not called (while tracing in my actual code the raf always appeared to be undefined).Here's a codesandbox reproducing the issue and has some further exposition.
Note: codesandbox seems to have issues resolving preact/compat sometimes. Hard reload the sandbox when this happens