3 ms·
> Combined with React Hooks (which replaced stateful classes with functional composition), the ecosystem shifted decisively toward FP. React is the farthest th
by breadwinner 1y ago
> Combined with React Hooks (which replaced stateful classes with functional composition), the ecosystem shifted decisively toward FP.
React is the farthest thing from functional, see here: https://mckoder.medium.com/why-react-is-not-functional-b1ed12a41323 https://mckoder.medium.com/why-react-is-not-functional-b1ed1...
Composition in React Hooks is closer to multiple inheritance in C++ (because it combines state and behavior from multiple components) than functional programming.
- epolanski 1y ago+1 hooks are not functional at all and they are stateful, they can't even be properly unit tested.