You supply a callback to the useEffect hook and this callback can return another callback.
The first callback is called on a mount event, the returned callback is the one that is called on an unmount event.
(If you supply an array as second argument to useEffect, the first callback is also executed if one of the elements intl this array changed between renders, if the array is empty, the first callback is only called in mount, like with my example)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Ah, okay.
You supply a callback to the useEffect hook and this callback can return another callback.
The first callback is called on a mount event, the returned callback is the one that is called on an unmount event.
(If you supply an array as second argument to useEffect, the first callback is also executed if one of the elements intl this array changed between renders, if the array is empty, the first callback is only called in mount, like with my example)