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'
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'