Re:Show HN: Tired of logic in useEffect, I built a class-bas...
by DauntingPear7 on Wednesday April 08, 2026 @09:00PM
(#47698127)
I don’t see how? You can do all sorts of FP in js and it even has some of it in its built in APIs. .then comes from FP
Re:Show HN: Tired of logic in useEffect, I built a class-bas...
by nurple on Wednesday April 08, 2026 @09:06PM
(#47698160)
Yes, but promises are (unfortunately) _not_ monads!
https://rybicki.io/blog/2023/12/23/promises-arent-monads.htm...
Re:Show HN: Tired of logic in useEffect, I built a class-bas...
by lateforwork on Wednesday April 08, 2026 @09:19PM
(#47698244)
You are right, there are some FP features in JavaScript. But the way it is used in the predominant UI framework (namely React) is definitely breaks FP, see https://mckoder.medium.com/why-react-is-not-functional-b1ed1...
Re:Show HN: Tired of logic in useEffect, I built a class-bas...
by com2kid on Thursday April 09, 2026 @12:30AM
(#47699279)
JS is primarily a functional language, it is built around functions as first class objects and closures.
The issue is the bar has been raised for what people call "functional" now. Everyone is picky "OMG not pure so it isn't really functional!!"
Yeesh.
What doesn't work in JavaScript is functional programming.