Hooks
useFeature
Check if the current user has access to a specific feature.| Name | Type | Description |
|---|---|---|
featureKey | string | The feature key to check |
options.refetchInterval | number | Auto-refetch interval in ms |
options.enabled | boolean | Whether to run the query |
UseQueryResult<FeatureAccess>
useFeatureGate
A convenience hook that combines access checking with callbacks.| Property | Type | Description |
|---|---|---|
hasAccess | boolean | Whether the user can use this feature |
isQuotaExceeded | boolean | Whether usage exceeds the limit |
usage | number | Current usage |
limit | number | Plan limit |
remaining | number | Remaining usage |
…plus all UseQueryResult properties |