danieldelcore / trousers

hooks-first CSS-in-JS library, focused on semantics and runtime performance

Home Page:https://danieldelcore.github.io/trousers/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

useGlobal duplicates styles on re-render

danieldelcore opened this issue · comments

If useGlobal is called twice, it has no way of detecting if a global has been mounted or not and will mount it again, causing duplicates.

To fix:
ensure all globals have a hash so that we can determine if the global has been mounted already.

and also ensure docs, tests, and storybooks are updated to match