cssinjs
cssinjs copied to clipboard
Missing effect style while mount/unmount due to globalEffectStyleKeys
related: https://github.com/ant-design/ant-design/issues/38911
A web component could be mount/unmount for multiple times. During when the actual dom could be created/recreated many times.
In such case, due to the cache mechanism: useStyleRegister.tsx#L386, some styles(particularly keyframes) are not able to be injected into the newly created dom element.
One way to solve this, is to use _cf, but obviously its not for production
Purpposal:
- expose
_cfin some way - execute some tear down actions during
unmountphase