Installation
Beta
Published under the beta tag while the API stabilizes. Install with @beta.
bash
npm add inertia-hotwire-native@betaRequirements
@inertiajs/core>= 2.0 (works with the v3 line)react>= 18 — only for theinertia-hotwire-native/reactentry
Setup
Call initHotwireNative() once, before createInertiaApp, in your Inertia entrypoint:
js
import { createInertiaApp } from '@inertiajs/react'
import { initHotwireNative } from 'inertia-hotwire-native'
const isHotwireNative = !!window.webkit?.messageHandlers?.turbo
initHotwireNative({ debug: import.meta.env.DEV || isHotwireNative })
createInertiaApp({ /* ... */ })That's all that's needed for native navigation (push/pop/replace/restore, modals, forms, error screens, pull-to-refresh).
To set up the native iOS and Android shells that load your app, see Native apps → iOS and Android.
Next: Navigation.