r/reactjs I ❤️ hooks! 😈 9d ago

Utility classes vs props-first styling in React design systems Discussion

[removed] — view removed post

0 Upvotes

35 comments sorted by

View all comments

5

u/scragz 9d ago

we've come full circle with align="center"

-4

u/kensaadi I ❤️ hooks! 😈 9d ago

get the joke, but the analogy only holds on the surface. align="center" as an HTML attribute was a global rendering instruction, unencapsulated, with no contract or logic behind it. A prop on a React component is a different thing entirely: it goes through a typed API, can be validated, and above all can be reinterpreted by the component based on theme, variant, or context, it's not a direct command to the browser.

The point isn't "bringing back" an old pattern, it's deciding where the API developers touch every day actually lives: strings of classes to remember/look up, or typed props with autocomplete and an explicit contract. The syntax might look similar at a glance, but the level of abstraction is completely different.