Hacker News new | ask | show | jobs
by haukur 3198 days ago
If you're interested in this approach, check out Pete Hunt's jsxstyle or Kent C Dodds' glamorous. Both allow you to pass in props that map to css rules (e.g., `<Flex justifyContent="center" />`).
1 comments

Doesn't it break the separation of concerns ? JSX is already a big red flag in that respect.
The separation of concerns is an illusion anyway. See hacker_9's comment.
So are most things in life. While we want to explain how everything is a different thing let's not forget that breaking most abstractions entails a valid point is being raised. I don't agree with almost all of the hacker_9's opinion, but that is just my opinion, which does not automatically make it a valid opinion.

A single thing covered in names.

What concerns? JSX is for writing UI code and CSS is part of the UI.
And we are all miserably part of your existence. Which does not imply that we should not be viewed as separate entities with different beliefs, desires and ways of reacting/interacting to the noise around us.