useRevstack
Returns theRevstackClient instance from context.
Signature
RevstackClient- The client instance configured in<RevstackProvider>
- Error if used outside of
<RevstackProvider>
useEntitlement
Subscribes to entitlement changes and returns the current state for a feature. Signaturekey(string) - The feature key to check
Entitlementobject with:key(string) - The feature keyhasAccess(boolean) - Whether the user has accessvalue?(string | number | boolean) - Optional limit or configuration value
useSyncExternalStore with a server snapshot that returns { key, hasAccess: false }, preventing hydration mismatches in Next.js and Remix.
Usage
- Updates automatically when entitlements change
- Safe for server-side rendering
- Returns
hasAccess: falseduring initial load and on server