4 ms·
hooks are amazing, wtf
by lunfard000 5y ago
hooks are amazing, wtf
- lolive 5y agoTo me, hooks allow to do class-based components without class. I do not exactly see the point. What is wrong with class-based components?
- midrus 5y agoIt is not cool
- hardwaresofton 5y agoTo Vue's credit, Evan has been absolutely up front and has made his rationale clear for why class based components were abandoned: https://github.com/vuejs/rfcs/pull/17#issuecomment-494242121 https://github.com/vuejs/rfcs/pull/17#issuecomment-494242121 You can't ask for more than that from someone who disagrees and is in control of the project. Also he's doing a pretty awesome job maintaining the project.
- midrus 5y agoIsn't this conversation about React?
- hardwaresofton 5y ago> What is wrong with class-based components? The posted link contains a detailed breakdown written by Vue's creator of why Vue, a similar tool to React chose to de-emphasize class-based components in favor of the composition API (hooks). I thought you might be able to find some clues to why people pick hooks over class-based components in there.