top | item 37410620

(no title)

debaserab2 | 2 years ago

In your estimation, what framework has best in class hooks?

discuss

order

Gunax|2 years ago

Some alternatives are:

Vue3/composition API -- probably the simplest if you're coming from React. Definitely feels like it was inspired by hooks.

Svelte/store -- svelte has a term called 'hook' but it's unrelated. The equivalent would be Svelte's store.

The other frameworks use something called 'Signals' (Preact, Qwik, Solid, Elm and even Angular/backbone though I don't personally have in depth knowledge of all of these).

IMO, I would prefer Svelte if you are adventurous, or Vue if you like React but just want something like 'better React'.

shirogane86x|2 years ago

I mean, Svelte/store is something completely different though, isn't it? it's more akin to Jotai/Zustand/Redux and friends than it is to hooks. If you had to compare Svelte with React, the thing "closest" (while stretching that word very much) to hooks would be the `$` reactivity things Svelte does? Because if you want a state management solution, react has that as well (many, in fact). Just not built in, and a lot of them work really well