News for hackers. Stuff that matters.
Re:Vue RFC: Expose logic-related component options via funct... by BigJono on Thursday June 20, 2019 @07:40PM (#20238557)
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.

Re:Vue RFC: Expose logic-related component options via funct... by thatswrong0 on Thursday June 20, 2019 @08:08PM (#20238728)
That 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.

Re:Vue RFC: Expose logic-related component options via funct... by ng12 on Thursday June 20, 2019 @08:43PM (#20238889)
They've increase the surface to reduce it over time, if that makes sense. Hooks are much more natural, simplistic way to write stateful components.