Question from the React ⚛️ test

Write a React component that displays the name of the current user.

Archived

What will this component display?

const MyComponent=({index})=>{
    const [myName, setMyName]= useState('');
    const myMemoisedName= useMemo(()=>`${myName}`,[]);
    useEffect(()=>setMyName('W3D'));

    return<div>{myMemoisedName}</div>;
};
Author: Vincent CotroStatus: Archived(New question!)Question passed 1878 times
-4
Community Evaluations
developer avatar
Auteur anonyme
27/06/2023
Encore une question absurde
developer avatar
Giorgi
12/09/2023
The 'index' props is not used, doesnt have relationchip with the question 'What show the component'
developer avatar
Auteur anonyme
29/09/2023
Hi Giorgi, the question was updated. Thank you !
developer avatar
Jorge
03/02/2023
The 'index' props is not used, doesnt have relationchip with the question 'What show the component'