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

Yes, and they explain it as well. Doing that leads to the component re-rendering immediately without rendering any child components.

This should be faster than useEffect which only executes after the entire render has been committed to the DOM.



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: