DEV Community

Discussion on: Why doesn't useState has a dependency array?

Collapse
 
pengeszikra profile image
Peter Vivo

Thats wierd because you store state in your custom hook, wich isn't good idea. Instead just use outer state, and your problem is solved.

Collapse
 
swadhwa16 profile image
Sumit Wadhwa

Yes you're right. thank you.