From 6ab8f594aa445a413231152dc2e3dee79098137e Mon Sep 17 00:00:00 2001 From: CoolSpring8 Date: Sat, 5 Aug 2023 17:59:38 +0800 Subject: [PATCH] docs(query-cancellation): reflect AbortController is now required --- docs/react/guides/query-cancellation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/react/guides/query-cancellation.md b/docs/react/guides/query-cancellation.md index e7cefdfb7c..3e8545c0aa 100644 --- a/docs/react/guides/query-cancellation.md +++ b/docs/react/guides/query-cancellation.md @@ -3,9 +3,9 @@ id: query-cancellation title: Query Cancellation --- -TanStack Query provides each query function with an [`AbortSignal` instance](https://developer.mozilla.org/docs/Web/API/AbortSignal), **if it's available in your runtime environment**. When a query becomes out-of-date or inactive, this `signal` will become aborted. This means that all queries are cancellable, and you can respond to the cancellation inside your query function if desired. The best part about this is that it allows you to continue to use normal async/await syntax while getting all the benefits of automatic cancellation. +TanStack Query provides each query function with an [`AbortSignal` instance](https://developer.mozilla.org/docs/Web/API/AbortSignal). When a query becomes out-of-date or inactive, this `signal` will become aborted. This means that all queries are cancellable, and you can respond to the cancellation inside your query function if desired. The best part about this is that it allows you to continue to use normal async/await syntax while getting all the benefits of automatic cancellation. -The `AbortController` API is available in [most runtime environments](https://developer.mozilla.org/docs/Web/API/AbortController#browser_compatibility), but if the runtime environment does not support it then the query function will receive `undefined` in its place. You may choose to polyfill the `AbortController` API if you wish, there are [several available](https://www.npmjs.com/search?q=abortcontroller%20polyfill). +The `AbortController` API is available in [most runtime environments](https://developer.mozilla.org/docs/Web/API/AbortController#browser_compatibility), but if your runtime environment does not support it, you will need to provide a polyfill. There are [several available](https://www.npmjs.com/search?q=abortcontroller%20polyfill). ## Default behavior