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
{{ message }}
Repository navigation
regression: createGlobalStyle does not remove styles on unmount #4100
After updating to v6 I started noticing that none of the global styles created by createGlobalStyle are removed after the component is unmounted.
I couldn't come up with a small reproducible case; in a codepen the global styles are removed; but in our app with hundreds of lines in the <style/> those global styles are clearly sticky.
Expected Behavior
Global style is removed when component is unmounted
Actual Behavior
Global styles remain in the stylesheet after component is unmounted
Activity
quantizor commentedon Jul 21, 2023
That's annoying! Would you be open to shooting over a quick PR to remove use of useInsertionEffect?
mdeschamps commentedon Jul 21, 2023
sure thing... PR ^