If you want to run an effect and clean it up only once (on mount and unmount), you can pass an empty array ([]) as a second argument. This tells R...
For further actions, you may consider blocking this person and/or reporting abuse
Also if you only want to run it on unmount, you can use
onUnmountHandler will then be called after the component unmounts.