In your component separation example, I would have used an AbortController instead of the active flag.
That way you can abort the fetch if the component is unmounted.
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.
In your component separation example, I would have used an AbortController instead of the active flag.
That way you can abort the fetch if the component is unmounted.