Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In JavaScript UI development it is not important, IMHO. So why do React developers keep pushing functional concepts, as if React is functional?


I'm not sure that they do. Just because Hooks was inspired by functional concepts like algebraic effects doesn't mean the core React team is suggesting that writing React code is functional programming.

With that said, my point is that it's more important what you can _do_ with a tool, rather than the purity of the tool with respect to an abstract concept. Or, in this case, with with respect to your interpretation of the abstract concept.

I don't think anyone is suggesting with a straight face that React code is purely functional -- this is JavaScript, after all! However, Hooks are a valuable feature, and if they were inspired by algebraic effects, then so be it.


A lot of React developers believe Hooks are functional and that they are doing functional programming by using Hooks. Whether the core React team is responsible for this perception or not I am not sure, but misleading developers about what functional programming is, is not cool.


Because it is inspired by functional concepts. Being a continuation does not inherently make you impure.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: