A guide to when React re-renders (2)
A nice guide on when react re-renders
When and why does React render my component exactly?
This post is my version of Mark Erikson’s essay A (Mostly) Complete Guide to React Rendering Behavior where I try to answer one of the most commonly asked questions in this React community – “when or why does React render my component?” – with a tiny amount of React source code walkthrough.
Normally I am not a big fan of drilling down to the implementation details and you certainly don’t need to know that in order to be productive in React. However, when it comes to understanding the rendering behaviour and rules for bailing out of re-renders, the React docs haven’t provided a thorough enough explanation to satisfy me. Therefore to adequately answer those questions, I had to peek into the source code. That being said, this is not going to be a post about hard-core source code walkthrough. If you are interested in that, here is a great series made by JSer that you should check out.