DEV Community

Discussion on: Using refs to check if a component is still mounted.

Collapse
 
blackr1234 profile image
blackr1234

I'm wondering why not an empty array too.

Collapse
 
soullivaneuh profile image
Sullivan SENECHAL

I did the same useMountedRef hook but with an empty array usage and it change not a thing. So yes, I would also prefer that way IMHO.