Clerk, Convex and Svelte
Hey
I have successfully added clerk to my svelte project and I'm almost there with convex auth but I'm still missing something.
+layout.svelte
is it possible to pass a custom convexClient to svelte useQuery?
** In react clerk you use "ConvexProviderWithClerk" (https://docs.convex.dev/api/modules/react_clerk)
I tried to reimplement it but it's just too time consuming since i don't know react and i don't fully understand the whole context.
Thanks, i really like convex but it's a bit of a pain working with it on svelte 5, i understand you are focused on react because its more adopted by the community 😦
Module: react-clerk | Convex Developer Hub
React login component for use with Clerk.
4 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Link to my repo: https://github.com/emilianocalzada/svelte-convex-clerk
It's almost fully integrated just need to use the authenticated convex client inside queries or if that's not possible create a wrapper Svelte component which provides a ConvexSvelteClient authenticated with Clerk
Hope you can help me
GitHub
GitHub - emilianocalzada/svelte-convex-clerk
Contribute to emilianocalzada/svelte-convex-clerk development by creating an account on GitHub.
I think i fixed it, i was creating 2 different convex clients and that was the error. now im just creating it in the main +layout.svelte
and using "useConvexClient" to get the instance where i need it.
I will let the repo public in case it helps anyone
Thanks for this! Was super helpful in enabling me to get up and running with svelte and clerk ❤️