Clerk React Patterns
React SPA auth patterns with @clerk/react for Vite/CRA - ClerkProvider setup, useAuth/useUser/useClerk hooks, React Router protected routes, custom sign-in flows. Triggers on: Vite Clerk setup, React Router auth, useAuth hook, protected route, custom sign-in form React.
- Type
- Skill
- Author
- clerk
- Category
- Frontend
- GitHub stars
- 89
- Installs
- 19.7K
- Last updated
- October 30, 2026
Install
npx skills add https://github.com/clerk/skills --skill clerk-react-patternsUse cases
- Set up ClerkProvider in a Vite or CRA React single-page app.
- Protect React Router routes and read user state with useAuth and useUser.
- Build a custom sign-in form with the useClerk hook.
Frequently Asked Questions
Which React setups does this skill target?
React SPAs using @clerk/react with Vite or CRA.
Which hooks does it cover?
useAuth, useUser, and useClerk.
Can it help with protected routes?
Yes, React Router protected routes are one of the covered patterns, along with custom sign-in flows.
About this skill
React SPA auth patterns for @clerk/react, covering ClerkProvider setup, the useAuth, useUser, and useClerk hooks, React Router protected routes, and custom sign-in flows. Use it with Vite or CRA projects that need client-side authentication wired up. Triggers include Vite Clerk setup, protected route configuration, and custom React sign-in forms.
Summary written with AI assistance from the project's public description.
Categories
More from clerk
Clerk Setup
Add Clerk authentication to any project by following the official quickstart guides.
by clerk
Clerk Custom Ui
Custom authentication flows and component appearance - hooks (useSignIn, useSignUp), themes, colors, fonts, CSS. Use for custom sign-in/sign-up flo...
by clerk
Clerk Backend Api
Clerk Backend REST API explorer and executor. Browse tags, inspect endpoint schemas, and execute authenticated requests. Use when listing users, ma...
by clerk
Clerk Nextjs Patterns
Advanced Next.js patterns - middleware, Server Actions, caching with Clerk.
by clerk
Similar Skills
Find Skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", o...
by vercel-labs
Grill Me
A relentless interview to sharpen a plan or design.
by mattpocock
Ai Video Generation
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0,...
by inference-sh
Ai Image Generation
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FL...
by inference-sh