By default, queries that unmount or become unused before their promises are resolved are not cancelled.
Both React Query and SWR work with providing your own fetcher. Cancelling requests depends on what fetcher you use...
// Example abort with fetch:constcontroller=newAbortController()fetch('https://google.com',{signal:controller.signal}))controller.abort()// Example abort with axiosconstsource=axios.CancelToken.source()axios.get('https://google.com',{cancelToken:source.token})source.cancel()
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.
From React Query documentation:
Both React Query and SWR work with providing your own fetcher. Cancelling requests depends on what fetcher you use...