DEV Community

[Comment from a deleted post]
Collapse
 
gautham495 profile image
Gautham Vijayan

No farid, I can even share my source code, It works absolutely fine.

Collapse
 
muhfaridzia profile image
Muhammad Farid Zia

Yaps, your code work, but your second useEffect will run every render because you omit deps, that's the problem.

reactjs.org/docs/hooks-effect.html...

 
gautham495 profile image
Gautham Vijayan

Naa bro! It works, You can go and check my project's console