Skip to main content
The /react subpath ships a lifecycle hook that owns reader resolution, connect/start sessions, per-tag debouncing, and permission surfacing. React is an optional peer dependency needed only for this subpath.
The hook reconnects silently on mount (autoConnect, default true) and exposes connectionState plus needsAuthorization, so a “Connect reader” button can be rendered only while one is actually needed. Pair it with autoStartWhenGranted so a reader that reconnects on a later visit starts scanning instead of waiting for a click that has nothing left to authorize.

Develop without hardware

Pass mockWhenUnavailable: true and drive the flow with fakeTap - and pair it with test chips to exercise the full API loop end to end, no reader or encoded chips required.