DEV Community

Discussion on: React useEffect() hook tutorial for begginers

Collapse
 
lyrod profile image
Lyrod

Is clean up exemple really works? Because resizeD is a new instance every render?

Collapse
 
developeratul profile image
Minhazur Rahman Ratul • Edited

the cleanup function will be executed when any other new value will exist for the same variable and yeah it works.