Utilisez le format EFFECT ES6
useEffect(() => {
console.log(`Component mounted`)
}, [])
Witty Weevil
useEffect(() => {
console.log(`Component mounted`)
}, [])