Skip to content

Dynamically calculated properties that take on many possible values? Garbage collection? #886

Answered by robinweser
dgreensp asked this question in Q&A
Discussion options

You must be logged in to vote

Heyhey!

Yes, highly dynamic values will create a lot of unique rules that are added immediately (which eventually leads to many style updates), but we use insertRule to do that, so the overhead is minimal. Yet, for values that change very often e.g. when animating values, I would recommend to use inline styles instead since they're more suited for this specific situation. Actually, this is true for every CSS in JS library, while Fela at least only renders the changed declaration and not the full style object.
With the atomic CSS approach, the size of your stylesheets already is way smaller compared to traditional solutions, but since you have a lot of uneven and most likely never reused d…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by robinweser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants