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 ?
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
Jump to solution
10 Replies
Solution
FleetAdmiralJakob 🗕 🗗 🗙
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
FleetAdmiralJakob 🗕 🗗 🗙
If it is standardized it would be easier to switch code between frameworks etc.
Mediocre
MediocreOP•9mo ago
Right, so it's not going to affect these frameworks directly.
FleetAdmiralJakob 🗕 🗗 🗙
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
Neto
Neto•9mo ago
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
Mediocre
MediocreOP•9mo ago
Makes sense. Yes, just not a lot of that magic code will be required from the framework. Thanks! @FleetAdmiralJakob 🗕 🗗 🗙 @nyx (Rustular DevRel)
Neto
Neto•9mo ago
(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
Mediocre
MediocreOP•9mo ago
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
Neto
Neto•9mo ago
the possibilities are great but the most immediate - smaller bundle size - even more performance
Mediocre
MediocreOP•9mo ago
Yep
Want results from more Discord servers?
Add your server