DEV Community

[Comment from a deleted post]
Collapse
 
tttl profile image
Trent

It would be better if there were more details in the jss part

Collapse
 
rokuem profile image
Mateus Amorim

Thanks! Tbh I didn't use jss to much, this was just an experiment I did on a side project hehe. The basic usage of it however is pretty much the same as cxs, where you declare a rule and add it to a tsx element. Also, it has the same pros, but without the cons.

I do prefer coding like this (jss + tsx with vue), but I didn't experiment much more as it would be quite complicated to use it in my current work for now :/

for the biggest advantages of not using vue components are the refactoring and the performance.

default exports are a bad practice. With this we can have named exports and rename components easily. We can also do the same for css rules, mixins and variables, we can document things, go to reference, and much more. The overall performance of the linters also get better (vetur is super slow), and we can bundle things faster too.