-
Couldn't load subscription status.
- Fork 402
fix(clerk-js): Preven't checkout data from being stale #5921
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(clerk-js): Preven't checkout data from being stale #5921
Conversation
🦋 Changeset detectedLatest commit: e013e41 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ef30f4f to
21b74fc
Compare
| { | ||
| staleTime: 0, | ||
| }, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added!
16cfb63 to
e013e41
Compare
Description
This PR fixes an issue where checkout data where being stale in some cases
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change