Error after following RR7 quick start guide - useNavigate() may be used only in the context of a <Router> component #4826
Labels
needs-triage
A ticket that needs to be triaged by a team member
Preliminary Checks
I have reviewed the documentation: https://clerk.com/docs
I have searched for existing issues: https://github.com/clerk/javascript/issues
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
https://github.com/sanisoclem/clerk-rr7-repro
Publishable key
Description
Starting a new RR7 project and following the clerk guide doesn't produce a working app. The page errors out with:
A few things I have tried:
ClerkProvider
to layout - same outcomeSteps to reproduce:
npx create-react-router@latest my-react-router-app
pnpm add @clerk/react-router
root.tsx
to userootAuthLoader()
root.tsx
's default exportApp
and wrapOutlet
withClerkProvider
Expected behavior:
To be redirected to login page
Actual behavior:
Error is shown:
Environment
The text was updated successfully, but these errors were encountered: