Skip to main content

Installation

No native module linking required. The package uses only React Native core components and the built-in fetch API.

Quick start

Wrap the authenticated portion of your app in <GatlioGate>:
  • Active<YourApp /> renders normally
  • Warning — a dismissable banner appears above content
  • Lockout — a full-screen overlay replaces all content until card is updated

<GatlioGate> props

Render behaviour

useGatlio hook

Use the hook directly for custom UI or state management:
Always use triggerCardUpdate() rather than calling Linking.openURL(cardUpdateUrl) directly. Bypassing it means onRecovered will never fire — the next poll returning active fires onActive instead.

Config stability

Every config change triggers a full reset. Pass a stable object or memoize:

Callbacks

Testing

Force a state

No network calls are made when forcedStatus is set. Remove before shipping.

Interactive sandbox

<GatlioSandbox> lets you switch states without a real Gatlio account:
A DEV badge appears in the bottom-right corner. Tap it to open a control sheet with state pills and a callback log. Remove <GatlioSandbox> before shipping to production.

TypeScript

All types are exported from the package root: