DEV Community

Discussion on: Whiteboard: React Hooks

Collapse
 
jakeerc profile image
Jakeer • Edited

Did you debuged you dependency array

useEffect(fn,[dep array keep empty for didMount])

Collapse
 
prafulla-codes profile image
Prafulla Raichurkar

I didn't do this that's why it was updating on every state change