Skip to content

useGatedAction

useGatedAction<A, R>(action, fn, context?, options?): GatedAction<A, R>

The React analog of the headless rt.gate(action, fn) (plan 144 TASK-14 / REQ-21, AC-11). run delegates to sdk.gate, so it emits the same active gate sequence — gate_attempted, then gate_allowed or gate_denied — rather than forking it. When allowed, the action runs wrapped in tracked-action telemetry (${action}_started_completed / _failed) and its return value is preserved. Without a provider, run is a safe no-op that reports denied (AC-13).

A extends unknown[]

R

string

(…args) => R | Promise<R>

RevTurbineEntitlementContext

TrackOptions

GatedAction<A, R>