Resolve some suspense crashes by JoviDeCroock · Pull Request #4999 · preactjs/preact (original) (raw)
Before this when we unmounted a vnode which was in a suspended state
it was possible to cause this to render while being unmounted.
One disturbing thing is that I wanted to check
vnode._component._onResolve
in the options.unmount hook, this however was not possible because
somehow the reference to _component isn't being updated on the
vnode that's actually unmounting. For this reason I opted to
use a separate flag.
JoviDeCroock added a commit that referenced this pull request
Fix suspense crash
Prevent unmounted suspended vnodes from rendering
Before this when we unmounted a vnode which was in a suspended state
it was possible to cause this to render while being unmounted.
One disturbing thing is that I wanted to check
vnode._component._onResolve
in the options.unmount hook, this however was not possible because
somehow the reference to _component isn't being updated on the
vnode that's actually unmounting. For this reason I opted to
use a separate flag.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})