use effect like component did mount
snippet in javascript

use effect like component did mount

user654

useEffect(() => {
	console.log('I am the new componentDidMount')
}, [])
// Don't forget the empty array at the end