Nonconformist Propaganda Machine

    @clerk/clerk-react
    TypeScript icon, indicating that this package has built-in type declarations

    3.2.18 • Public • Published

    Clerk logo

    @clerk/clerk-react


    Overview

    Clerk is the easiest way to add authentication and user management to your React application. Add sign up, sign in, and profile management to your application in minutes.

    Getting Started

    Prerequisites

    • React v16+
    • Node.js v14+

    Installation

    npm install @clerk/clerk-react

    Build

    npm run build

    To build the package in watch mode, run the following:

    npm run dev

    Usage

    Clerk requires your application to be wrapped in the <ClerkProvider/> context.

    If using Create React App, set REACT_APP_CLERK_FRONTEND_API to your Frontend API in your .env.local file to make the environment variable accessible on process.env and pass it as the frontendApi prop.

    import { render } from 'react-dom';
    
    import { ClerkProvider, SignedIn, SignedOut, SignInButton, UserButton } from '@clerk/clerk-react';
    
    const frontendApi = process.env.REACT_APP_CLERK_FRONTEND_API;
    
    render(
      <ClerkProvider frontendApi={frontendApi}>
        <App />
      </ClerkProvider>,
      document.getElementById('root'),
    );
    
    function App() {
      return (
        <>
          <h1>Hello Clerk!</h1>
          <SignedIn>
            <UserButton afterSignOutUrl={window.location.href} />
          </SignedIn>
          <SignedOut>
            <SignInButton mode='modal' />
          </SignedOut>
        </>
      );
    }

    For further details and examples, please refer to our Documentation.

    Support

    You can get in touch with us in any of the following ways:

    Contributing

    We're open to all community contributions! If you'd like to contribute in any way, please read our contribution guidelines.

    Security

    @clerk/clerk-react follows good practices of security, but 100% security cannot be assured.

    @clerk/clerk-react is provided "as is" without any warranty. Use at your own risk.

    For more information and to report security issues, please refer to our security documentation.

    License

    This project is licensed under the MIT license.

    See LICENSE for more information.

    Install

    npm i @clerk/clerk-react

    Homepage

    clerk.dev/

    DownloadsWeekly Downloads

    4,345

    Version

    3.2.18

    License

    MIT

    Unpacked Size

    240 kB

    Total Files

    239

    Last publish

    Collaborators

    • giannis-clerk
    • igneel64
    • chanioxaris
    • agis-clerk
    • colinclerk
    • bradenclerk
    • sokratis
    • yourtallness
    • nikosdouvlis