4 ms·
Are class components really considered out of date? I still prefer writing those compared to functional components. Vue is also moving in that direction with th
by woutr_be 4y ago
Are class components really considered out of date? I still prefer writing those compared to functional components. Vue is also moving in that direction with their composite API.
I think it’s why I like Svelte, it’s just JavaScript.
- orangepanda 4y ago{# is it just javascript?}
- satvikpendem 4y agoIt's not, that's why I like React, I don't have to learn how to do a for loop in a custom HTML DSL again. And before anyone says it, no, JSX is not a DSL, it's just syntax sugar over JS, you can write React fully in createElement if you want.
- satvikpendem 4y agoHooks are a very useful abstraction, they are like functions but with a built in of lifecycle state (so not pure but implicitly effectful). I cut down so much code using hooks, I even use them in non JS projects even, such as in Flutter with flutter_hooks, that's how strong of an abstraction they are.