DEV Community

Discussion on: Five common mistakes writing react components (with hooks) in 2020

Collapse
 
theluk profile image
Lukas Klinzing

Problem with 3 is that it will setstate even though the component might be unmounted already. So you need to handle unsubscriptions. But that you have to do anyways