Skip to content

Conversation

@markerikson
Copy link
Collaborator

@markerikson markerikson commented Oct 22, 2025

This PR:

  • Updates the prefetch util to use {subscribe: false} to avoid creating subscriptions
  • Removes a very dead and bogus isPrefetch flag that was being passed in
  • Makes the PrefetchOptions optional
  • Adds some docs on prefetching behavior

Fixes #1283

@codesandbox
Copy link

codesandbox bot commented Oct 22, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 22, 2025

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 d71e347:

Sandbox Source
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration
rtk-esm-cra Configuration

@github-actions
Copy link

github-actions bot commented Oct 22, 2025

size-limit report 📦

Path Size
1. entry point: @reduxjs/toolkit/query/react (modern.mjs) 15.2 KB (+0.02% 🔺)
1. entry point: @reduxjs/toolkit/query (cjs, production.min.cjs) 24.5 KB (+0.18% 🔺)
1. entry point: @reduxjs/toolkit/query/react (cjs, production.min.cjs) 26.78 KB (-0.14% 🔽)
2. entry point: @reduxjs/toolkit/query (without dependencies) (cjs, production.min.cjs) 11.14 KB (+0.03% 🔺)
3. createApi (.modern.mjs) 15.6 KB (-0.14% 🔽)
3. createApi (react) (.modern.mjs) 17.6 KB (+0.01% 🔺)

@netlify
Copy link

netlify bot commented Oct 22, 2025

Deploy Preview for redux-starter-kit-docs ready!

Name Link
🔨 Latest commit d71e347
🔍 Latest deploy log https://app.netlify.com/projects/redux-starter-kit-docs/deploys/68f936967de9d20008829e34
😎 Deploy Preview https://deploy-preview-5116--redux-starter-kit-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@markerikson markerikson force-pushed the bugfix/1283-prefetch-subscriptions branch from 1cb1cfa to d71e347 Compare October 22, 2025 19:55
@markerikson markerikson merged commit 4432629 into master Oct 22, 2025
120 checks passed
@aryaemami59 aryaemami59 deleted the bugfix/1283-prefetch-subscriptions branch October 23, 2025 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prefetch creates a suscription that can not be unsubscribed

1 participant