-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: abort controller fallback #2446
fix: abort controller fallback #2446
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 242d99f:
|
✅ Deploy Preview for redux-starter-kit-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Hi, thanks for the PR! At this point I am thinking we should rather remove that polyfill: IE has dropped and there is no more desktop browser supporting it. In node environments, that polyfill can cause more harm than good, since some So my suggestion would be that we keep it for the time being and remove that polyfill in the 2.0 major. @markerikson what are your thoughts? |
Hi @phryneas Thanks for your feedback on this, What will be the plan for the v2, should AbortController be mandatory to use RTK ? |
I haven't thought about it in-depth, but given that you don't need a polyfill in the browser any more, node 16 ships with AbortController, and (in the case of older node versions) on the server installing a polyfill also doesn't consume any "over the wire data", I think it would be okay to say "we expect an AbortController implementation to be available". |
This makes sense, in the same way as fetch |
Should I close this PR or it's still relevant for pre 2.0 version ? |
Good question - could you close this, but open an issue in the other direction a la "remove abortcontroller" so we can label that as 2.0 and track it? :) |
Thanks I've created #2448 |
Description
Inside
createAsyncThunk
currently RTK have a fallback in caseAbortController
is not declared.redux-toolkit/packages/toolkit/src/createAsyncThunk.ts
Line 530 in e307245
This seems not the case for the
listenerMiddleware
redux-toolkit/packages/toolkit/src/listenerMiddleware/index.ts
Line 89 in 3d7bd22
How to reproduce the issue ?
AbortController