Skip to content

useEntitlement

function useEntitlement<V>(feature, options?): EntitlementState<V>;

Defined in: src/react/index.tsx:255

One feature, computed client-side: { allowed, enabled, limit, used, remaining, value, resetsAt, loading, unlockedBy }. amount is what the UI is about to ask for (default 1). UX only — enforce on the server.

Type Parameter Default type
V | JsonValue | undefined
Parameter Type
feature string
options? { amount?: number; }
options.amount? number

EntitlementState<V>