Hacker News new | ask | show | jobs
by iliaznk 2221 days ago
In general I agree that all that JSS mess is something invented by someone too lazy (to put it mildly) to learn how CSS works (just like hooks – too lazy to figure out "this" and classes in JS), but if you read the docs a bit closer, you'd find that plain CSS works just as well https://material-ui.com/guides/interoperability/.
2 comments

> just like hooks – too lazy to figure out "this" and classes in JS

That's just a part of why hooks exist: https://reactjs.org/docs/hooks-intro.html#motivation

The more important parts have to do with code reusability and complexity.

And the way classes work in React is not typical and there _are_ non-standard behaviors to them, so to brush that additional complexity aside is myopic.

Oh, did I? But as far as I remember, not having to figure out classes was one of the official reasons why hooks came to be, which was clearly stated in the corresponding blog post, I think.
Oops, the original comment I was replying to is gone... I didn't notice before that people here seem to like to comment and then delete it a minute later.
Funnily enough I started working with hooks a couple months ago and I can no longer go back to classes. And Functional programming has just made things so smooth.