RajiDurai / Counter_React

counter problem
0 stars 0 forks source link

Issue # 2 - Rendering issue on Child #4

Open RajiDurai opened 1 month ago

RajiDurai commented 1 month ago

The child component is re-rendered everytime the parent is rendered. Use React.Memo on child component itself like const ChildComponent = React.memo(({title}) => { so that it's rendered only once. Because the child displays just a constant 'Child Component'