3 ms·
This is what I don't get about hooks. Remembering Markbages great talk on 'Minimal API Surface Area'? How is having multiple ways of doing the same thing minima
by BigJono 7y ago
This is what I don't get about hooks. Remembering Markbages great talk on 'Minimal API Surface Area'? How is having multiple ways of doing the same thing minimal API surface area?
React is losing sight of what made it great when it came out. Do one thing, do it well, and do it the simplest way possible.
- thatswrong0 7y agoThat sort of absolutist logic will never allow a framework to progress and become better. Sometimes good ideas come around (IMO like hooks) that are worth increasing the API surface area for. I for one loathe using class components now and not being able to share logic compositionally via hooks when I work with them. I feel more productive and I feel like my components are smaller and more focused, and I don’t repeat myself as much. It’s been a net win for me, and I think it’s well worth having two supported APIs that do roughly the same thing.. because despite this, React is still a small and focused library API-wise.
- ng12 7y agoThey've increase the surface to reduce it over time, if that makes sense. Hooks are much more natural, simplistic way to write stateful components.