I always get this problem when using useEffect but I see others do it just fine. Here is my Code. Component 1 (Parent):
const UsePrevious = (value)=> {