ClerkProvider + QueryClientProvider doesn't work?
I was following the start-clerk) repo and wanted to add React query to it as well but noticed that they don't mesh together well. I have the following:
And i get this error:
React TanStack Router Start Clerk Basic) Example | TanStack Router ...
An example showing how to implement Start Clerk Basic) in React using TanStack Router.
6 Replies
protestant-coralOP•13mo ago
I noticed i can do it in a different way
:check:
manual-pink•13mo ago
hey, can you share what the other way was? I am having the same issue.
conscious-sapphire•13mo ago
Your providers can be wrapped using the
Wrap
option on the router.
Probably something like this was used.manual-pink•12mo ago
You can’t put the Clerk Provider in there, it needs to be in a route
conscious-sapphire•12mo ago
Have you looked at the clerk example?
https://github.com/tanstack/router/tree/main/examples/react/start-clerk-basic
GitHub
router/examples/react/start-clerk-basic at main · TanStack/router
🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering. - TanStack/router
conscious-sapphire•12mo ago
You could use it for wrapping Clerk at the RootComponent, whilst doing the
react-router-with-query
to wrap the app.
https://github.com/TanStack/router/blob/5f791faae8d4a60130dcdb49d4030b716c015804/examples/react/start-basic-react-query/app/router.tsx#L3-L25GitHub
router/examples/react/start-basic-react-query/app/router.tsx at 5f7...
🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering. - TanStack/router