Re:Solid.js feels like what I always wanted React to be
by toomanydoubts on Tuesday March 01, 2022 @04:31AM
(#30511787)
I fail to see the purity in react with all that useState, which obviously by the name is tracking state outside the scope of the function(eg: it's actually View = F() and data is coming from outside when calling useState).
It's not pure at all. I really would like to see something more akin to Elm, where all your state is explicitly passed into the component, and you have commands that update state and trigger the view again, making it actually "functional".
I guess this takes the form of redux in react, but I'd like to see it ingrained in the components themselves.
[ Parent
| on HN ]
Re:Solid.js feels like what I always wanted React to be
by imtringued on Tuesday March 01, 2022 @09:26AM
(#30514502)
Yes it's var View = F() and var hidden_global_variables_for_hooks;