4 ms·
> The equivalent React simple counter example [...] is much more understandable IMO/. Eh, I'm a backend dev, and it isn't more understandable for me. setCount
by tasuki 4y ago
> The equivalent React simple counter example [...] is much more understandable IMO/.
Eh, I'm a backend dev, and it isn't more understandable for me. setCount is a constant yet we're calling it as a function? And what the hell is useState?
I've written a fair bit of Elm on some toy projects and enjoyed it.
- naet 4y agoIn JS functions are first class citizens that can be saved to variables, passed as arguments or returned by other functions, etc.
- satvikpendem 4y agoMore understandable if you already know Javascript of course. If you don't, of course you'd be confused why const is used (it's technically as if the constant were a pointer to a function, but in practice a function and a pointer to a function are one and the same in JS). useState is one of those things that's a React specific concept, yes, but the rest of the code is very familiar to non-React frontend developers in general.