Skip to main content
zerotal

Documentation


Documentation / @zerotal/inertia / PageObject

Interface: PageObject

Defined in: inertia/src/types.ts:10

The Inertia "page object" — the serialisable payload that describes a page.

On a first load it is embedded into the HTML shell's data-page script; on subsequent visits it is the JSON response body. The Inertia client reads it to mount/swap the page component and to drive partial-reload, merge, defer, once, and history behaviour. Built by buildPageObject; the optional fields are only present when the corresponding prop feature is in use.

Properties

component

component: string

Defined in: inertia/src/types.ts:12

Page component name/path (relative to the pages dir, no extension), e.g. "Users/Index".


props

props: Record<string, unknown>

Defined in: inertia/src/types.ts:14

The resolved props for the page.


url

url: string

Defined in: inertia/src/types.ts:16

The request URL (pathname + query) this page was rendered for.


version

version: string

Defined in: inertia/src/types.ts:18

Asset version; a mismatch triggers a full reload so the client picks up new assets.


encryptHistory?

optional encryptHistory?: boolean

Defined in: inertia/src/types.ts:20

Encrypt this page's history state in the browser (only set when true).


clearHistory?

optional clearHistory?: boolean

Defined in: inertia/src/types.ts:22

Clear any previously encrypted history state (only set when true).


preserveFragment?

optional preserveFragment?: boolean

Defined in: inertia/src/types.ts:24

Preserve the URL fragment across a redirect.


mergeProps?

optional mergeProps?: string[]

Defined in: inertia/src/types.ts:26

Prop keys (or key.path) the client should append-merge instead of replacing.


prependProps?

optional prependProps?: string[]

Defined in: inertia/src/types.ts:28

Prop keys (or key.path) the client should prepend-merge.


deepMergeProps?

optional deepMergeProps?: string[]

Defined in: inertia/src/types.ts:30

Prop keys (or key.path) the client should deep-merge.


matchPropsOn?

optional matchPropsOn?: string[]

Defined in: inertia/src/types.ts:32

key.path entries whose last segment is the field used to match items when merging.


scrollProps?

optional scrollProps?: Record<string, unknown>

Defined in: inertia/src/types.ts:34

Infinite-scroll pagination config, keyed by prop name.


deferredProps?

optional deferredProps?: Record<string, string[]>

Defined in: inertia/src/types.ts:36

Deferred props grouped by request group; the client fetches them after first render.


rescuedProps?

optional rescuedProps?: string[]

Defined in: inertia/src/types.ts:38

Deferred prop keys that threw and were rescued server-side.


onceProps?

optional onceProps?: Record<string, { prop: string; expiresAt: number | null; }>

Defined in: inertia/src/types.ts:40

Once props, keyed by once-key → { prop, expiresAt }.


sharedProps?

optional sharedProps?: string[]

Defined in: inertia/src/types.ts:42

Top-level shared prop keys, for instant-visit carry-over.