useEntitlement
useEntitlement(
__namedParameters):UseEntitlementResult
React hook that wraps sdk.checkEntitlement().
Returns a reactive entitlement result that can drive access-gate UI.
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”UseEntitlementOptions
Returns
Section titled “Returns”UseEntitlementResult
Example
Section titled “Example”function BrandKitSection() { const { allowed, denied, result } = useEntitlement({ handle: 'brand_kit' }); if (denied) return <UpgradePrompt reason={result?.reason} />; return <BrandKitEditor />;}