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