I want to know which I should use more. like:
const Parent=()=>{
const myElement=useMemo(()=><MyComponent {...props}/>,[...props]);
return (<div>{myElement}</div>);
}
compare with
const MyComponent=memo(()=>...);
const Parent=()=>{
return (<div><MyComponent {...props}/></div>);
}
I want to know which I should use more. like:
compare with