Skip to main content

useGravityRail()

@gravity-rail/react


@gravity-rail/react / useGravityRail

Function: useGravityRail()

useGravityRail(): GravityRailContextValue

Access the resolved Gravity Rail client. Falls back to a provider-less default (same-origin, site context from window) so the components work in a bare source-site bundle without an explicit <GravityRailProvider>.

Returns​

GravityRailContextValue