react hooks on component did mount code example
Example 1: react hooks componentdidmount
// import useEffect from 'react';
useEffect(() => {
// your code here
}, []);
Example 2: componentdidmount in hooks
useEffect(() => {
// Your code here
}, []);