logoalt Hacker News

bryzaguytoday at 4:30 AM1 replyview on HN

Reminds me of styled components. If the goal is generating the selector why not let the body be a string: ```{ Item: "color: red;" }```?


Replies

tenphitoday at 8:29 AM

Because usually each style requires its own set of states, and raw strings are hard to type (in Typescript). But there are even more reasons.

`styled-components` is just an advanced CSS injector. We used it as an injector in the early version of Tasty.