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
@vercel
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 Ready Ready Preview Nov 19, 2025 2:48pm

@alexisintech
Copy link
Member

I did a final sweep, everythings looking good but I'll let @SarahSoutoul decide and merge as she is the OP 🙏

@SarahSoutoul
Copy link
Contributor Author

Preview

@alexisintech Noticed one issue with ClerkAPIResponseError not being linked properly. It was due to a duplication of it in clerk-typedoc, which caused the links to be broken. Fix here: clerk/javascript#7251. Will need to merge that fix first, and then re-test.

Screenshot 2025-11-18 at 10 52 58 am Screenshot 2025-11-18 at 10 51 44 am

@SarahSoutoul
Copy link
Contributor Author

I did a final sweep, everythings looking good but I'll let @SarahSoutoul decide and merge as she is the OP 🙏

Have tested everything now and it's lookin good. Just need your approval @alexisintech and I'll merge!

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 work on this sarah, you're the GOAT!!! 😸💖

@SarahSoutoul SarahSoutoul merged commit 3437802 into main Nov 19, 2025
7 checks passed
@SarahSoutoul SarahSoutoul deleted the ss/DOCS-10983 branch November 19, 2025 15:01
@SarahSoutoul SarahSoutoul mentioned this pull request Nov 19, 2025
2 tasks
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.

4 participants