Skip to content

useCan

useCan(handle, options?): UseCanResult

Reactive counterpart to the imperative rt.can(handle) — the entitlement check as a can question. Takes the entitlement handle positionally (matching rt.can('handle')), plus the same options useEntitlement accepts, and returns a curated { can, limited, result }.

For the full reactive surface (allowed / denied / isLoading / error / gatedPlacement / recheck), use useEntitlement directly.

string

Omit<UseEntitlementOptions, "handle">

UseCanResult

function BatchExport() {
const { can, limited } = useCan('batch_export');
if (!can) return <UpgradePrompt />;
return <BatchExportButton warnLowBalance={limited} />;
}