SKILL15.6K installs89

Clerk React Router Patterns

React Router v7/v8 patterns with Clerk — rootAuthLoader, getAuth in loaders, clerkMiddleware, protected routes, SSR user data, org switching. Triggers on: react-router auth, rootAuthLoader, getAuth loader, react-router protected route, loader authentication, SSR auth react-router, useNavigate may be used only in the context of a Router.

Type
Skill
Author
clerk
Category
Frontend
GitHub stars
89
Installs
15.6K
Last updated
October 30, 2026

Install

npx skills add https://github.com/clerk/skills --skill clerk-react-router-patterns

Use cases


Frequently Asked Questions

Which React Router versions are covered?

React Router v7 and v8.

What auth patterns does it show?

rootAuthLoader, getAuth in loaders, clerkMiddleware, protected routes, SSR user data, and org switching.

Does it help with the useNavigate error?

Yes — it addresses the 'useNavigate may be used only in the context of a Router' error.


About this skill

Covers React Router v7 and v8 auth patterns with Clerk: rootAuthLoader, getAuth in loaders, clerkMiddleware, protected routes, SSR user data, and organization switching. Use it when adding authentication to a React Router app or debugging loader-level auth. It also addresses the common "useNavigate may be used only in the context of a Router" error.

Summary written with AI assistance from the project's public description.


Categories


More from clerk


Similar Skills