Skip to content

fix: update JavaScript quickstart for clerk-js v6#3177

Merged
jacekradko merged 24 commits intomainfrom
jacek/update-js-quickstart-for-v6
Mar 25, 2026
Merged

fix: update JavaScript quickstart for clerk-js v6#3177
jacekradko merged 24 commits intomainfrom
jacek/update-js-quickstart-for-v6

Conversation

@jacekradko
Copy link
Copy Markdown
Member

@jacekradko jacekradko commented Mar 4, 2026

Order of deployment

  1. Dashboard PR
  2. This PR

Summary

  • Adds @clerk/ui@1 UI bundle loading to both the NPM module and <script> tag approaches
  • Updates CDN references from @clerk/clerk-js@5 to @clerk/clerk-js@6
  • Passes ui: { ClerkUI: window.__internal_ClerkUICtor } to clerk.load() in all code examples
  • Adds VITE_CLERK_FRONTEND_API_URL env var and uses it to load the UI bundle (consistent with {{fapi_url}} in the <script> tag approach)

Context

The JavaScript quickstart guide was missing the required UI bundle loading step for @clerk/clerk-js v6. Without this, users following the guide would not see any prebuilt components rendered. The guide also referenced @clerk/clerk-js@5 in CDN URLs and derived the frontend API domain from the publishable key instead of using an env var.

Verified against the reference repo: https://github.com/jacekradko/clerk-javascript-quickstart

Test plan

  • Verify the NPM module code examples work end-to-end with a fresh Vite project
  • Verify the <script> tag examples work end-to-end in a plain HTML file
  • Confirm prebuilt components (SignIn, UserButton) render correctly

@jacekradko jacekradko requested a review from a team as a code owner March 4, 2026 19:24
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 4, 2026

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

Project Deployment Actions Updated (UTC)
clerk-docs Ready Ready Preview Mar 25, 2026 2:30pm

Request Review

Comment thread docs/getting-started/quickstart.js-frontend.mdx Outdated
Comment thread docs/getting-started/quickstart.js-frontend.mdx Outdated
Comment thread docs/getting-started/quickstart.js-frontend.mdx Outdated
Comment thread docs/getting-started/quickstart.js-frontend.mdx
@SarahSoutoul
Copy link
Copy Markdown
Contributor

@jacekradko Okay gave this a bit of a polish with the docs review. I'm not super keen on approving this right away for several reasons:

  • The Dashboard doesn't currently display the frontend api url in the <script> as discussed in this comment, so it could confuse users to read the docs and then not actually see that in the Dashboard as the docs state.

  • This right here

    Screenshot 2026-03-04 at 1 53 42 pm
  • The quickstart repo and dashboard onboarding guide also need to be updated.

@manovotny would you be able to give this a look too?

Comment thread docs/getting-started/quickstart.js-frontend.mdx Outdated
Comment thread docs/getting-started/quickstart.js-frontend.mdx
Comment thread docs/getting-started/quickstart.js-frontend.mdx
Comment thread docs/getting-started/quickstart.js-frontend.mdx
Comment thread docs/getting-started/quickstart.js-frontend.mdx
Comment thread docs/getting-started/quickstart.js-frontend.mdx
Comment thread docs/getting-started/quickstart.js-frontend.mdx
Co-authored-by: Michael Novotny <manovotny@gmail.com>
Comment thread docs/getting-started/quickstart.js-frontend.mdx
@SarahSoutoul SarahSoutoul self-assigned this Mar 23, 2026
Comment thread docs/getting-started/quickstart.js-frontend.mdx
@SarahSoutoul
Copy link
Copy Markdown
Contributor

@jacekradko should we be applying these changes: https://github.com/clerk/dashboard/pull/8779/changes/d99c2509a0ccb982778f4749142b836f544ca11f on here too?

@manovotny
Copy link
Copy Markdown
Contributor

@jacekradko should we be applying these changes: clerk/dashboard@d99c250 on here too?

@SarahSoutoul yes, but let the reviews/changes settle there first.

@jacekradko
Copy link
Copy Markdown
Member Author

jacekradko commented Mar 25, 2026

@SarahSoutoul @manovotny The code examples are now aligned with the dashboard

@manovotny
Copy link
Copy Markdown
Contributor

manovotny commented Mar 25, 2026

@SarahSoutoul @manovotny The code examples are not aligned with the dashboard

@jacekradko you said "not", but I'm guessing you meant "now"? cbee428 looks like alignment.

Copy link
Copy Markdown
Contributor

@manovotny manovotny left a comment

Choose a reason for hiding this comment

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

Updates LGTM. @SarahSoutoul should give her 👍 too.

Copy link
Copy Markdown
Contributor

@SarahSoutoul SarahSoutoul left a comment

Choose a reason for hiding this comment

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

Lets shipppp

@jacekradko jacekradko merged commit 9690ad8 into main Mar 25, 2026
8 checks passed
@jacekradko jacekradko deleted the jacek/update-js-quickstart-for-v6 branch March 25, 2026 20:25
@jacekradko
Copy link
Copy Markdown
Member Author

@manovotny Yep! I totally meant NOW, not NOT 🤣

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