ComponentDidMountis called later when the componen is added to the DOM. Usually this function is used to run additional code after react has updated the DOM. (Eg, fetching external data, manual updating DOM mutation). This function has "side-effect"
useEffectfunction for every render might not be good for performance. A second argument to the
useEffectcan be pass to only run the function when the listed data changed