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