title: Why React does't compare Previous State and New State before re rendering? Why it always render when setState is called?
body: <p>If React compares (Shallow) previous state and next state before re-rendering, it will reduce many renders which helps to optimize performance.</p>
  
  <p>According to <a href="https://reactjs.org/docs/react-component.html#setstate" rel="noreferrer">React docs</a>, React always render component and their children when the setState method is called. Should React smartly handle unwanted re-rendering of a component and their children. </p>