UNPKG

@adonis-agora/authkit-react

Version:

Frontend ergonomics over AuthKit for AdonisJS + Inertia + React apps: a typed useAuth() hook, role-gating hooks and gating components.

6 lines (5 loc) 230 B
import { createContext, createElement } from 'react'; export const AuthContext = createContext(undefined); export function AuthProvider({ value, children }) { return createElement(AuthContext.Provider, { value }, children); }