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

React is designed so that you should never need to read from the DOM except things like an input field's value. React specifically tries to never touch the DOM except when doing necessary mutations.

If you're doing complicated layout code, then you will need to read from the DOM. Currently React doesn't have great support for managing layout from JS in a clean, efficient way but it's one of the things we're looking to add in the future.



> React is designed so that you should never need to read from the DOM

Oh absolutely, sorry if that was not clear.

But sometimes you need to (e.g. to place an overlay or tooltip thing over an element), and AFAIK that remains possible.


Correct.




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

Search: