Skip to content

Conversation

@NWylynko
Copy link
Contributor

@NWylynko NWylynko commented Jun 17, 2025

🔎 Previews:

Screenshot 2025-06-18 at 4 29 33 AM Screenshot 2025-06-18 at 4 30 27 AM

What does this solve?

  • This would be the first usage of the new sdk scoping tools, by setting the sdk in the frontmatter
  • Adding code examples for Astro (doesn't support plans and features yet), Chrome Extension (PricingTable is broken), JS Frontend, Nuxt, Vue, React, React Router, Remix, Tanstack, Expressjs, Fastify and Expo

What changed?

  • This brings in a code example for each sdk that <PricingTable /> is supported in
  • When a user has an unsupported sdk selected these pages are hidden in the sidebar
  • The users current active sdk is in the url of these pages

Checklist

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

@vercel
Copy link

vercel bot commented Jun 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
clerk-docs ✅ Ready (Inspect) Visit Preview Jul 15, 2025 3:55pm

@NWylynko NWylynko marked this pull request as ready for review June 19, 2025 20:18
@NWylynko NWylynko requested a review from a team as a code owner June 19, 2025 20:18
@SarahSoutoul
Copy link
Contributor

SarahSoutoul commented Jul 11, 2025

@NWylynko I was investigating this ticket as it pertains to this PR. I'm confused as Expo doesn't support the <PricingTable> component , so there isn't any way really to test out the <Protect> component with the "plan" and "feature" props. Surely, if one cannot subscribe to a plan within an Expo app, there is no reason to be using the "plan" and "feature" props at all. If that's the case, then we need to change some of the stuff in this PR, and make changes to this page too.

Tagging you for visibility and thoughts too @alexisintech.

UPDATE:

  • Ended up importing the <PricingTable> component from @clerk/clerk-react, and that worked
  • Using the <Protect> component using the "plan" and "feature" props also worked. But, that was on Expo Web. As @royanger said above, it doesn't work on Expo Mobile tho, so we prob want to have some type of callout for this.
  • @royanger is it all of Clerk billing not working on Expo mobile, including the <Protect> component. If so, that would explain this ticket right here. Otherwise, I'm not sure as it definitely worked for me but that was on Expo web.

@NWylynko
Copy link
Contributor Author

@NWylynko I was investigating this ticket as it pertains to this PR. I'm confused as Expo doesn't support the <PricingTable> component , so there isn't any way really to test out the <Protect> component with the "plan" and "feature" props. Surely, if one cannot subscribe to a plan within an Expo app, there is no reason to be using the "plan" and "feature" props at all. If that's the case, then we need to change some of the stuff in this PR, and make changes to this page too.

Tagging you for visibility and thoughts too @alexisintech.

UPDATE:

* Ended up importing the `<PricingTable>` component from `@clerk/clerk-react`, and that worked

* Using the `<Protect>` component using the "plan" and "feature" props also worked. But, that was on Expo Web. As @royanger said above, it doesn't work on Expo Mobile tho, so we prob want to have some type of callout for this.

* @royanger is it all of Clerk billing not working on Expo mobile, including the `<Protect>` component. If so, that would explain this ticket right [here](https://linear.app/clerk/issue/DOCS-10614/feedback-for-componentsprotect). Otherwise, I'm not sure as it definitely worked for me but that was on Expo web.

One quick thing to point out. Is the same clerk application could be used across both a nextjs website and an expo app for example. So a user could be signed in on the website, subscribe using the <PricingTable /> on the website. then switch back over to the mobile expo app.

I am all for adding helpful call outs, I can do my own testing of Expo support for these features and add some callouts.

@royanger
Copy link
Member

One quick thing to point out. Is the same clerk application could be used across both a nextjs website and an expo app for example. So a user could be signed in on the website, subscribe using the <PricingTable /> on the website. then switch back over to the mobile expo app.

I am all for adding helpful call outs, I can do my own testing of Expo support for these features and add some callouts.

@royanger royanger closed this Jul 11, 2025
@royanger
Copy link
Member

* Using the `<Protect>` component using the "plan" and "feature" props also worked. But, that was on Expo Web. As @royanger said above, it doesn't work on Expo Mobile tho, so we prob want to have some type of callout for this.

* @royanger is it all of Clerk billing not working on Expo mobile, including the `<Protect>` component. If so, that would explain this ticket right [here](https://linear.app/clerk/issue/DOCS-10614/feedback-for-componentsprotect). Otherwise, I'm not sure as it definitely worked for me but that was on Expo web.

I commented in the Linear, but I would expect <Protect /> to work in Expo Web and Mobile. This might be a bug and worth asking about in the team user help channel.

Any component and renders something in the UI (like <SignIn /> or <PricingTable /> does not work in Expo Mobile (the components use things like <div> and <p> which are not in Expo Mobile. That means currently a user can't subscribe, view plans, cancel plans, and so on since that's all just in components. There is work underway (maybe close to completion?) to add hooks/custom flows which might enable Billing in Expo Mobile. I say maybe as I haven't looked and don't know the state of hooks and what's being added or not.

@royanger
Copy link
Member

Sorry, I'm not sure how I ended up closing this. My mistake.

@royanger royanger reopened this Jul 11, 2025
@SarahSoutoul
Copy link
Contributor

* Using the `<Protect>` component using the "plan" and "feature" props also worked. But, that was on Expo Web. As @royanger said above, it doesn't work on Expo Mobile tho, so we prob want to have some type of callout for this.

* @royanger is it all of Clerk billing not working on Expo mobile, including the `<Protect>` component. If so, that would explain this ticket right [here](https://linear.app/clerk/issue/DOCS-10614/feedback-for-componentsprotect). Otherwise, I'm not sure as it definitely worked for me but that was on Expo web.

I commented in the Linear, but I would expect <Protect /> to work in Expo Web and Mobile. This might be a bug and worth asking about in the team user help channel.

Any component and renders something in the UI (like <SignIn /> or <PricingTable /> does not work in Expo Mobile (the components use things like <div> and <p> which are not in Expo Mobile. That means currently a user can't subscribe, view plans, cancel plans, and so on since that's all just in components. There is work underway (maybe close to completion?) to add hooks/custom flows which might enable Billing in Expo Mobile. I say maybe as I haven't looked and don't know the state of hooks and what's being added or not.

Okay. In that case, this PR should be good to go @NWylynko

@NWylynko NWylynko merged commit 9c8e0b9 into main Jul 15, 2025
7 checks passed
@NWylynko NWylynko deleted the nick/billing-sdk-scoped branch July 15, 2025 17:13
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