News for hackers. Stuff that matters.
Re:Why Do React Hooks Rely on Call Order? by danabramov on Thursday December 13, 2018 @08:21AM (#18672081)
I suggest you to read about algebraic effects. We don't have them in JavaScript, but conceptually that's what Hooks represent. (This is as functional as it gets.)

React has always been about taking useful ideas from functional programming and bringing it to mainstream through pragmatic choices in JS.

Your concern about the "globalness" is addressed in Sebastian's comment which is linked five times throughout the post — you should definitely check it out! https://github.com/reactjs/rfcs/pull/68#issuecomment-4393148...

Finally, don't forget you're comparing Hooks to classes. Those are hardly functional either.

There are no comments on this comment yet.