If I understood your question right - no, ref (isMounted in this case) should not be a part of dependencies because it is something different (from the 'state' for example) by nature. That said, changing useRef.current value does not cause the re-render, so it's just being changed 'silently' and only help the useEffects to fire when they really should.
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.
If I understood your question right - no,
ref
(isMounted
in this case) should not be a part of dependencies because it is something different (from the 'state' for example) by nature. That said, changinguseRef.current
value does not cause the re-render, so it's just being changed 'silently' and only help theuseEffect
s to fire when they really should.