1
ReactAdvanced#performance
componentDidMount maps to useEffect with [], componentDidUpdate to useEffect with dependencies, and componentWillUnmount to the cleanup function returned from useEffect.
useEffect(() => {
subscribe(); // mount
return () => unsubscribe(); // unmount
}, []);
useEffect(() => sync(id), [id]); // update