How to use `componentDidMount()` with `useEffect()`?
function Component() {
useEffect(() => console.log('Component did mount!'), [])
return null
}
September 9th, 2019
useEffect()
receives two arguments: The first is a callback functions which is fired after browser layout and paint. The second argument is an array of values and reponsible for the behavior of useEffect.