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

Yes. React re-renders components recursively by default. So, any state update in a parent component will recurse through and render all child components. But, a "render" does not necessarily imply a "DOM update" - it's about asking the components "what do you want the UI to look like now?", and determining _if_ updates are needed. This can be optimized if needed.

For more details, see:

- https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-...

- https://www.zhenghao.io/posts/react-rerender



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

Search: