Why Signals Are Better Than React Hooks

Why Signals Are Better Than React Hooks

Web Dev Simplified

6 месяцев назад

445,082 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

HeyMakedonsky
HeyMakedonsky - 05.11.2023 02:34

Surprised that people are surprised by reactivity-based stores/variables that behave in a way very similar to mobx/VueEx after them existing for so long


Although signals being able to figure out inside which components they're being called/used to trigger their re-renders instead of me having to wrap everything in observer HOC is pretty nice feat!

Ответить
offset
offset - 05.11.2023 01:59

Kyle? who's Sally? are u cheating on me? 😿

Ответить
Adeyanju Segun Samuel
Adeyanju Segun Samuel - 04.11.2023 23:33

Watching this as someone who used vue before react. I was just reading ref and reactive every time he mentioned signal. If you know you know.

Ответить
Mohib Habib
Mohib Habib - 04.11.2023 22:06

It just looked to me like another global state management tool. We can achieve the same thing with the redux and other global state management tools, However it might be helpful for smaller applications where you don't want to setup the redux. basically just better than the useState hook ?
I would love if someone can correct me or add something to what I just said above.

Ответить
Life of Sky
Life of Sky - 04.11.2023 21:22

that's really cool - it makes Redux history... where the hell did the good ol' boiler plate stuff go? haha. Cool. I would love to know if there's any downside at all using signal into large applications + It would be great to see how this fits in a NextJS project too.

Ответить
Asia Cuisine
Asia Cuisine - 04.11.2023 19:41

Still not as clean as Vue.

Ответить
Asia Cuisine
Asia Cuisine - 04.11.2023 19:32

Just use Vue, Swelte, and others. React is dinosaur, and trash, breaking basic design principals.

Ответить
q
q - 04.11.2023 19:27

Two lovely guitars making love on the background, soon we`ll see the little mandolin also

Ответить
Charbel Mansour
Charbel Mansour - 04.11.2023 18:51

i mean you could just store the completed count in redux but okay

Ответить
Anurag Singh
Anurag Singh - 04.11.2023 18:34

Please make full course on React Signals.

Ответить
Nick A
Nick A - 04.11.2023 18:01

isnt this just a context with proper subscriptions ?

Ответить
Rebel
Rebel - 04.11.2023 17:51

Seems similar to how Jotai atom works.

Ответить
Rebel
Rebel - 04.11.2023 17:47

Correction, React doesn't re-rendres components with no HTML change, but rather parses it. Big difference and it's what it is designed to do.

Ответить
V P ASWIN KUMAR
V P ASWIN KUMAR - 04.11.2023 16:32

Thank you for sharing your knowledge. I am waiting for full course

Ответить
Nwankwo Ernest Onyebuchi
Nwankwo Ernest Onyebuchi - 04.11.2023 16:02

Great job Kayle

Ответить
Tài Nguyễn Trọng
Tài Nguyễn Trọng - 04.11.2023 16:00

I think this's just another approach.
We can use different syntaxes (or libraries) but looks like the data flow and rendering logic did not change much.
In my opinion, reactive things sometimes can be quite magic, especially in large codebase it will be hard to debug.
Signals and React hooks can still exist equally and choosing which one depends on the personality of developer, like choosing framework for your project.

Ответить
JavaScript With Sohail
JavaScript With Sohail - 04.11.2023 15:54

This is amazing!!!!!! React + signals (easy state management) + improved performance! What else would I want in life? Thank you Kyle!!!!!

Ответить
Sebastian Fast
Sebastian Fast - 04.11.2023 15:39

Wow, love it! Please make a full tutourial! :D

Ответить
Gui Mendel
Gui Mendel - 04.11.2023 15:36

if we're going to turn react into vue why not just use vue man
Don't get me wrong, I loved this video, but I hate how much praise react gets when there are much better frameworks out there

Ответить