A library for conditional rendering components based on authentication/authorization
npm install @rccpr/auth-gateA JSR-compliant React library for protecting views in your application with authentication gates.
Partially inspired by the Clerk Protect component.
``bashDeno
deno add @rccpr/auth-gate
$3
`bash
npm
npm install @rccpr/auth-gateYarn
yarn add @rccpr/auth-gatepnpm
pnpm add @rccpr/auth-gateBun
bun add @rccpr/auth-gate
`Development
$3
- Bun (for development)
$3
`bash
bun install
`$3
`bash
Build for npm
bun run buildType checking
bun run typecheckLint with Biome
bun run lintFix linting issues
bun run lint:fixFormat code
bun run format
`$3
This library follows JSR's "no slow types" policy:
- ✅ All exported functions have explicit return types
- ✅ All exported types are properly declared
- ✅
isolatedDeclarations: true` in TypeScript configMIT