Medium
What will this component display and what can we say about index
?
const MyComponent=({index})=>{
const [myName, setMyName]= useState('');
const myMemoisedName= useMemo(()=>`${myName}`,[]);
useEffect(()=>setMyName('W3D'));
return<div>{myMemoisedName}</div>;
};
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!
Similar QuestionsMore questions about React