DEV Community

loading...

Discussion on: My experiements with Vuejs and css-in-js + tsx

Collapse
rokuem profile image
Mateus Amorim Author

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.