How are signals going to be any different that state variables in React?
I was just watching Theo's videos on signals coming to javascript (https://www.youtube.com/watch?v=JvE_xQVIFF0) and I'm a little confused. I get that this will be there for all of javascript but still would this impact React or similar state-ful libraries/frameworks in any way. I mean, we already have these features in these that's the whole point of them being state-ful. Can somebody please explain what I'm missing here ?
Theo - t3․gg
YouTube
If this ships, it will change javascript forever
Signals in JavaScript might be at Stage 0, but it's a very exciting Stage 0 proposal. My love of Solid forces me to be hyped
SOURCES
https://github.com/proposal-signals/proposal-signals
https://eisenbergeffect.medium.com/a-tc39-proposal-for-signals-f0bedd37a335
https://twitter.com/nullvoxpopuli/status/1775164667179966685
Check out my Twitch, T...
Solution:Jump to solution
Yes, exactly, react already has a way of doing it but it's not standardized in any way. These signals would be standardized for the whole browser platform
10 Replies
Solution
Yes, exactly, react already has a way of doing it but it's not standardized in any way. These signals would be standardized for the whole browser platform
If it is standardized it would be easier to switch code between frameworks etc.
Right, so it's not going to affect these frameworks directly.
That's the choice of the framework authors. But it would make sense for the frameworks to build on top of these platform primitives because of standards.
The proposal is made in such a way that frameworks can easily integrate this
it's going to, because in theory, you could remove a big chunk of the shipped code
becuase you dont need to send the "engine" as well
mostly using the browser impl
Makes sense.
Yes, just not a lot of that magic code will be required from the framework.
Thanks! @FleetAdmiralJakob 🗕 🗗 🗙 @nyx (Rustular DevRel)
(in theory) as well
you could have one singular source of truth between multiple frameworks
signal A can sync data between solid and svelte, as a example
yeah yeah it would be more like a javascript thing
That would make things really interesting if you want to communicate between two apps built using different frameworks
the possibilities are great
but the most immediate
- smaller bundle size
- even more performance
Yep