RajiDurai / Counter_React

counter problem
0 stars 0 forks source link

Removing un-necessary child-rerendering #3

Open RajiDurai opened 1 month ago

RajiDurai commented 1 month ago
  1. Remove usememo for the child title as there is no memorization involved in a string which is immutable.
  2. Memo the entire child component as below so that the child stops re-rendering const Mchild = React.memo(ChildComponent);