4 ms·
Hooks definitely need to be deeply learned, and has one of the steeper learning curves in React. But at its core, its solving a hard problem (lifecycle side-eff
by KuhlMensch 7y ago
Hooks definitely need to be deeply learned, and has one of the steeper learning curves in React. But at its core, its solving a hard problem (lifecycle side-effects), in a way that is more functional, and produces more maintainable code. Thats a fair trade-off imho. And honestly, once you understand them, the infinite loops are deterministic and understandable.
If you want a component-based view library that is written in js, and you are happy to take on the task of assembling a build-system, styling system, routing and of course state-management, I can't see much of an architectural improvement you could make over React.
If you want batteries included - go with Vue.
If you want the Ruby/spring opinion and batteries included go with Ember.
Svelte looks kinda cool. But it seems to sit deep in the browser spec, and in my NAIVE opinion, it doesn't seem hold the component abstraction as something even valuable. It just wants you to script away. Which, is just movement within a trade-off space - if it suits you go for it.
- jesseskinner 7y agoThe component abstraction is primary with Svelte. Each file is a component and only one component. This means the only ceremony you need to create a component is to create a new file. It's a perfect solution in my opinion.