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

React was literally first created in ML out of the author's dislike of MVC, who preferred functional programming and immutability[0]. For a long time, react aspired for its future to be in ReasonML.

Hooks came as no surprise to anyone who paid attention, as the recommended way to write components since at least 2016 was in the stateless functional style whenever possible, and many of us used recompose[1] to simulate hooks long before their introduction.

[0] https://github.com/reactiflux/q-and-a/blob/master/jordan-wal...

[1] https://github.com/acdlite/recompose



Maybe I was not paying attention, this is of course a possibility, but until at least early 2019 the react website's main page was only mentioning the class-based "stateful component" as the way to write components.

https://web.archive.org/web/20190105060636/https://reactjs.o...

Although they were mentioning function components at the time in the documentation, I can't say how mainstream that was. Hooks were introduced in Feb. 2019.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: