npm
or yarn
to install the Clerk React module.ClerkProvider
allows you to render Clerk Components and access the available Clerk React hooks in any nested component. You'll have to wrap your application once with a <ClerkProvider/>
.<ClerkProvider/>
component at the root of your React app so that it is available everywhere you need it.<ClerkProvider/>,
first you need to locate the entry point file of your React app. Usually this is your src/index.js
(Create React App) or pages/_app
(Next.js) file. In general, you're looking for the file where the ReactDOM.render
function gets called.<ClerkProvider/>
navigate prop allows you to provide a function which takes the destination URL as an argument and performs a "push" navigation. You should not implement the push yourself, but instead wrap the navigate
function provided by your router.