Skip to content

Conversation

SarahSoutoul
Copy link
Contributor

@SarahSoutoul SarahSoutoul commented Sep 30, 2025

🔎 Previews:

  • All previews can be accessed via the linked hooks under the Testing section below. This section is meant to help for the testing process and helps keep track of everything. Please note that the returns and params will be broken when checking the hooks on the preview links - this is normal as this PR will need to be merged first.. I would focus on reviewing the code examples on this PR.

What does this solve?

Fixes https://linear.app/clerk/issue/DOCS-10983/ensure-all-hooks-are-using-typedocs-have-code-examples-for-each.

This PR is part of a broader project aimed at adding more code examples to our hooks documentation. During project discussions, we agreed that the current structure of our hooks docs needed to be revisited. Currently, most of the hook pages are fully rendered through Typedoc, including code examples. However, adding additional examples through Typedoc would have required significant restructuring of the JavaScript repo.

To address this, we decided to:

Additionally, not all hooks currently use Typedoc. This PR also ensures that all hooks are properly configured to use Typedoc for their returns and parameters.

This PR includes:

  • Adding code examples for all supported SDKs.
  • Ensuring the updated Typedoc outputs are properly integrated into the docs site.

This PR will be the second in a sequence. First, we need to merge the javascript PR, which:

  • Adds JSDoc comments to the billing hooks so their returns and parameters are correctly pulled from Typedoc.
  • Updates the documentation setup to ensure Typedoc is used only for returns and parameters, not for examples or SDK explanations.

What changed?

This PR adds all the code examples for the supported SDKs for each hook + uses the newly rendered Typedoc returns/ parameters, placing them after the examples for the most part.


Testing

  • useAuth - already using typedoc, but examples need to be moved out

    • astro
    • chrome-extension
    • expo
    • react-router
    • tanstack-react-start
  • useClerk - already using typedoc, but examples need to be moved out

    • chrome-extension
    • expo
    • react-router
    • tanstack-react-start
  • useUser - already using typedoc, but examples need to be moved out

    • chrome-extension
    • expo
    • nextjs
    • react-router
    • tanstack-react-start
  • useSession - already using typedoc, but examples need to be moved out

    • chrome-extension
    • expo
    • react-router
    • tanstack-react-start
  • useSessionList - already using typedoc, but examples need to be moved out

    • chrome-extension
    • expo
    • react-router
    • tanstack-react-start
  • useSignIn - already using typedoc, but examples need to be moved out

    • chrome-extension
    • expo
    • react-router
    • tanstack-react-start
  • useSignUp - - already using typedoc, but examples need to be moved out

    • chrome-extension
    • expo
    • react-router
    • tanstack-react-start
  • useCheckout - need to be using typedoc

    • React
  • usePaymentAttempts - need to be using typedoc

    • React
  • usePaymentElement - need to be using typedoc

    • React
  • usePaymentMethods - need to be using typedoc

    • React
  • usePlans - need to be using typedoc

    • React
  • useStatements - need to be using typedoc

    • React
  • useSubscription - need to be using typedoc

    • React
  • useReverification - need to be using typedoc (examples already done)

Checklist

  • I have clicked on "Files changed" and performed a thorough self-review
  • All existing checks pass

@SarahSoutoul SarahSoutoul self-assigned this Sep 30, 2025
Copy link

vercel bot commented Sep 30, 2025

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

Project Deployment Preview Updated (UTC)
clerk-docs Error Error Oct 14, 2025 8:47pm

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.

2 participants