Docs

Clerk React SDK

The Clerk React SDK is built on top of the JavaScript SDK and is the recommended method for integrating Clerk into your React application.

Custom hooks

The React SDK provides hooks that give you access to the Clerk object, User object, and helper methods for authentication flows.

Important

Clerk provides optimized SDKs for specific React frameworks. If you're using one of the supported frameworks below, you should use its dedicated SDK instead of @clerk/clerk-react.

For example, Next.js applications must use @clerk/nextjs as @clerk/clerk-react is not compatible.

Clerk offers framework-specific SDKs that are customized to provide the better developer experience and integration with each framework's features. Choose the appropriate SDK based on your framework:

FrameworkPackageDocs
Next.js@clerk/nextjsNext.js SDK
React Router@clerk/clerk-react-routerReact Router SDK
Remix@clerk/remixRemix SDK
Astro@clerk/astroAstro SDK
Tanstack Start@clerk/tanstack-startTanstack Start SDK

Set up Clerk React

Before you can add Clerk to your React application, you must create a Clerk app in the Clerk Dashboard. To get started, follow the setup guide. Then, follow the quickstart guide to set up the React SDK in your app.

Feedback

What did you think of this content?

Last updated on