4 ms·
Hooks are much better. The only problem with hooks is that people don't get them. But once you get them, every other approach looks like a complicated pile of s
by BigJono 4y ago
Hooks are much better. The only problem with hooks is that people don't get them. But once you get them, every other approach looks like a complicated pile of shit.
I think the dev community does really poorly with these kinds of abstractions that are very simple but completely unintuitive.
I place a lot of the blame on the React team too. When hooks came out, their docs were absolutely terrible. They probably still are. They were full of shitty editorialising like "we created hooks because we found classes were too difficult for people to understand!", which made every dev I worked with feel insecure for not immediately knowing how to write super awesome clean code.
- danielvaughn 4y agoI'm a big fan of hooks, but I'm still not completely sold on them. I like code that reads in logical sequence, like you're telling a story. When you use `useEffect` to coordinate side effects from prop changes, it makes me feel like I'm reading a story written by Quentin Tarantino. That being said, it's a relatively small complaint.
- imbnwa 4y ago>I'm a big fan of hooks, but I'm still not completely sold on them. I like code that reads in logical sequence, like you're telling a story. When you use `useEffect` to coordinate side effects from prop changes, it makes me feel like I'm reading a story written by Quentin Tarantino. I actually read this as a compliment considering Tarantino himself spoke in an interview about how his non-linear storytelling style comes from the way novels he'd read were written.
- localvoid 4y ago> The only problem with hooks is that people don't get them. But once you get them, every other approach looks like a complicated pile of shit. No, some people actually get them and there are way much better alternatives[1]. 1. http://intelligiblebabble.com/compose-from-first-principles/ http://intelligiblebabble.com/compose-from-first-principles/