Inertia integration options
These options apply to custom integrations that call createInertiaQueryHost() directly.
InertiaProvider configures the host for the standard app binding.
Preserve URL
Section titled “Preserve URL”When calling createInertiaQueryHost() directly with a location port, omit preserveUrl
to keep the browser URL, Inertia page URL, and table state synchronized. Unrelated query
parameters and other tables’ parameters are preserved.
Explicit values use Inertia’s native behavior:
preserveUrl |
Behavior |
|---|---|
true |
Preserve the current URL and skip persisting the reload result in history |
false |
Use the response URL when replacing the current history entry |
Service boundary
Section titled “Service boundary”createInertiaQueryHost({ page, reload, location?, preserveUrl? }) supplies queryV1:
passive prop reads/subscriptions and committed channels for owned query keys, reloads and
cancellation. InertiaProvider supplies it through @inertiax/react; useQueryHost() reads it
inside an app binding. Put the provider inside Inertia’s page context.
Table from @inertiax/react-table takes host and prop. Its portable
createTableQueryIntegration({ host, prop }) in @inertiax/table-core owns Table decoding,
state reconciliation and reset rules. Direct rendering needs neither the shared React provider
nor Inertia. A custom query host must honor the pre-commit projection and cancellation contract;
a request wrapper alone is insufficient.
Channels reject overlapping prop/query-key ownership and unowned edits. Dispose a manually
opened channel to cancel outstanding work and release its subscriptions. Passive reads create
no channel; Table acquires its channel only while committed. The provider itself owns no
Table runtime. See Direct envelope for TableProvider runtime ownership.