3 ms·
FP is different things to different people. For me, it's pure functions and a preference for purely functional data scructures (Okasaki style). Also to me, FP
by civility 7y ago
FP is different things to different people. For me, it's pure functions and a preference for purely functional data scructures (Okasaki style).
Also to me, FP has an emphasis on avoiding mutating state. The second example on the React front page shows how to mutate state, and then they just build from there. I don't use React, but looking at those examples, it all looks very OO to me.
- revvx 7y agoReact with class-components is very OOP. Hooks are closer to functional programming, though (but were released only a couple months ago)