3 ms·
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
by toomanydoubts 5y ago
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.
- imtringued 5y agoYes it's var View = F() and var hidden_global_variables_for_hooks;