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.
Parameters
Section titled “Parameters”handle
Section titled “handle”string
options?
Section titled “options?”Omit<UseEntitlementOptions, "handle">
Returns
Section titled “Returns”Example
Section titled “Example”function BatchExport() { const { can, limited } = useCan('batch_export'); if (!can) return <UpgradePrompt />; return <BatchExportButton warnLowBalance={limited} />;}