Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aeliox
Copy link
Contributor

@aeliox aeliox commented Apr 4, 2025

Currently, useFetch caches data using only a string-ified version of the params as a key, which very easily leads to cache collisions.

This adds an optional resourceId param that is used in conjunction with the params to create the cache key. This is optional and not breaking.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@changeset-bot
Copy link

changeset-bot bot commented Apr 4, 2025

🦋 Changeset detected

Latest commit: 746df0f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Apr 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2025 10:34pm

@aeliox aeliox merged commit 936d223 into main Apr 4, 2025
30 checks passed
@aeliox aeliox deleted the keiran/useFetch-cache-key branch April 4, 2025 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants