Replies: 1 comment
-
I haven't specifically done performance profiling on this, but I believe that under the hood, the first time an I don't believe there would be much of a performance difference VS separate components, if any — especially with so few variants. But I'd be curious if someone has tested this, especially with far more variants. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I started using Stitches recently and was wondering if there were any performance drawbacks when using variants.
I use variants to apply conditional styles (based on viewport, current location, theme mode, drawer mode etc...) as follows:
By doing this, I went from having 3-4 slightly different components to a single one which I assume can only improve performance. As I don't know how variants work under the hood, it might only help improve the DX and might be worse in terms of performance than using multiple similar components.
What's the truth?
Beta Was this translation helpful? Give feedback.
All reactions