3 ms·
> Functional doesn’t mean stateless (state exists as closures within higher order functions, such as in the composition of functional components within React)
by flowerlad 6y ago
> Functional doesn’t mean stateless (state exists as closures within higher order functions, such as in the composition of functional components within React)
Being stateless and side-effect free is pretty fundamental to functional programming. If you can't replace a function call with its resulting value (without changing the meaning of the program) then it is not functional programming.
React is neither stateless nor side-effect free. Mapping it to concepts from functional programming is counter-productive. You get something that is neither fish nor fowl.