Skip to content

Conversation

@octoper
Copy link
Member

@octoper octoper commented May 14, 2025

Description

This PR fixes an issue where checkout data where being stale in some cases

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 May 14, 2025

🦋 Changeset detected

Latest commit: e013e41

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 May 14, 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 May 14, 2025 8:49pm

@octoper octoper force-pushed the vaggelis/com-800-re-opening-checkout-form-shows-stale-data-after-subscribing branch from ef30f4f to 21b74fc Compare May 14, 2025 13:45
@octoper octoper self-assigned this May 14, 2025
Comment on lines 27 to 36
{
staleTime: 0,
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like an odd way to fix. Should we clear the checkout fetch cache on checkout success instead?

Copy link
Member Author

@octoper octoper May 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do invalidate on checkout but it's tied to the selected checkout that was completed, AFAIK we don't have a way to clear the cache only by resourceId because if how our useFetch is working, @panteliselef will work on replacing our useFetch with SWR that will probably solve this issue without this addition

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 can we leave a comment here with additional context?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added!

@octoper octoper force-pushed the vaggelis/com-800-re-opening-checkout-form-shows-stale-data-after-subscribing branch from 16cfb63 to e013e41 Compare May 14, 2025 20:48
@octoper octoper enabled auto-merge (squash) May 14, 2025 20:49
@octoper octoper merged commit 83f1014 into main May 14, 2025
32 checks passed
@octoper octoper deleted the vaggelis/com-800-re-opening-checkout-form-shows-stale-data-after-subscribing branch May 14, 2025 20:56
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.

6 participants