3 ms·
Worth noting: the author of this articles does not believe React is functional: https://twitter.com/jrsinclair/status/1398780972506619907 https://twitter.com/jr
by petilon 4y ago
Worth noting: the author of this articles does not believe React is functional:
https://twitter.com/jrsinclair/status/1398780972506619907 https://twitter.com/jrsinclair/status/1398780972506619907
- horsawlarway 4y agoTo be fair - I mostly agree with that take. React with hooks is not functional. I think it's fair to say that React itself acknowledges this by making a distinction between a PureComponent and a Component. React itself certainly can be functional, but... (hot take) functional programming without the part where you actually make state changes is - drumroll - useless. If it ain't changing state and there are no side effects - no one gives a fuck. Because it literally isn't doing anything. Turns out computers are fundamentally state machines. Functional programming certainly has some nifty ideas, and it can be a helpful way to reason about code that will lead to state changes - but the part people want is the state change.