useEffect(()=>{letmediaQuery=window.matchMedia("(min-width: 768px)");mediaQuery.addListener(setMQuery);// this is the cleanup function to remove the listenerreturn()=>mediaQuery.removeListener(setMQuery);},[]);
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.
Added the cleanup function to remove the listener