Skip to content

Update examples for Clerk and TanStack Start documentation#2970

Merged
SarahSoutoul merged 6 commits intomainfrom
ss/DOCS-11381
Jan 16, 2026
Merged

Update examples for Clerk and TanStack Start documentation#2970
SarahSoutoul merged 6 commits intomainfrom
ss/DOCS-11381

Conversation

@SarahSoutoul
Copy link
Contributor

@SarahSoutoul SarahSoutoul commented Jan 15, 2026

🔎 Previews:

What does this solve?

While both beforeLoad and loader run on the server, they also execute on the client during navigation. Because of this, using auth() (and has()) directly inside beforeLoad or loader is incorrect. Instead, auth() and has() should only be used inside createServerFn. Any permission or auth-based checks should be computed there, and the resulting data can then be safely consumed in beforeLoad or loader.

The current examples also rely on the deprecated getAuth, which further contributes to the confusion.

What changed?

  • Modified all the billing examples using the auth() (and has()) directly inside beforeLoad or loader.

@SarahSoutoul SarahSoutoul self-assigned this Jan 15, 2026
@vercel
Copy link

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
clerk-docs Ready Ready Preview Jan 16, 2026 8:39pm

Request Review

@SarahSoutoul SarahSoutoul changed the title Update examples for Clerk and TanStack Start documentation (WIP) Update examples for Clerk and TanStack Start documentation Jan 15, 2026
@SarahSoutoul SarahSoutoul marked this pull request as ready for review January 16, 2026 16:13
@SarahSoutoul SarahSoutoul requested a review from a team as a code owner January 16, 2026 16:13
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@SarahSoutoul SarahSoutoul changed the title (WIP) Update examples for Clerk and TanStack Start documentation Update examples for Clerk and TanStack Start documentation Jan 16, 2026
Copy link
Member

@wobsoriano wobsoriano left a comment

Choose a reason for hiding this comment

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

left a comment but this looks good!

Copy link
Member

@alexisintech alexisintech left a comment

Choose a reason for hiding this comment

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

awesome catches! thanks sarah 🙏 😸💖

@SarahSoutoul SarahSoutoul merged commit 39ae236 into main Jan 16, 2026
8 checks passed
@SarahSoutoul SarahSoutoul deleted the ss/DOCS-11381 branch January 16, 2026 20:40
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.

5 participants