react hook equivalent componentdidmount code example
Example: react hooks componentdidmount
// import useEffect from 'react';
useEffect(() => {
// your code here
}, []);
// import useEffect from 'react';
useEffect(() => {
// your code here
}, []);