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

> Hooks was the natural evolution that removed all possibility of accidentally referencing stale data.

It unfortunately does not, you can hve various foot guns with refs or omitting dependencies from the array argument; but to your point it makes it a lot easier to ensure you do it correctly by collocating logic related to each cross cutting concern instead of entangling the code in the lifecycle methods.

More precisely it makes it easier to follow correct patterns, but as always that is subjective and hooks can be contentious :)



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: