DEV Community

Discussion on: Understanding Reflow and Repaint in the browser

Collapse
 
wangkangping profile image
wangkangping

Each time you try to update innerHTML, reflow will happen. Since updating innerHTML will cause the change of position of other elements. So that's why reflow happens.

In my view, reflow is more expensive than repaint. If you see how browser works, You will know it.
Here is the link: blog.sessionstack.com/how-javascri...