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

Yes; you mount your top-level React component into a <div>, and React won't touch the DOM outside of that.

It also provides hooks that get called throughout the lifecycle of each component, including whenever it's been added to or about to be removed from the DOM. These can be used to integrate non-React Javascript behaviors that want direct access to the DOM, but you still have to properly handle cleaning up when React wants to take your DOM node away.



Hah, it's UpdatePanel all over again!


Except UpdatePanels are horrid whereas React is quite nice :P




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: