how to assing new value when the compoennt render in seEffect code example
Example 1: react use effect
useEffect(() => {
},[]);
Example 2: useeffect with cleanup
useEffect(() => {
//your code goes here
return () => {
//your cleanup code codes here
};
},[]);