useEffect, useState, constructor code example
Example 1: react use effect
useEffect(() => {
},[]);
Example 2: useeffect with cleanup
useEffect(() => {
//your code goes here
return () => {
//your cleanup code codes here
};
},[]);