6 ms·
What advantage does this offer over composing using standard CSS classes, and maybe even using something like `classnames` to simplify the conditional logic? Fe
by drawfloat 3y ago
What advantage does this offer over composing using standard CSS classes, and maybe even using something like `classnames` to simplify the conditional logic? Feels like tying your project in quite heavily to a library that might become deprecated.
- DangitBobby 3y agoLooks like it's pretty much just a way to use stitches' typed variant system with CSS modules instead of CSS in JSX. So variants are typed without you manually adding `variant`, `color` etc. boilerplate props any time you want a variation. If it's typed you don't have to dig through CSS files or deal with poor IDE support for CSS module classname resolution, and can instead use the excellent TS support. As for it maybe being "deprecated" someday... I don't that's a fair criticism, since any library with a small user base is at risk. This one doesn't have much that can rot, it's not like they are doing transpilations, it's just a thin wrapper over React and CSS modules.