Inertia.js lets you quickly build modern single-page React, Vue, and Svelte apps using classic server-side routing and controllers.Laravel Data works excellently with Inertia.
Basic Usage
Pass data objects directly to Inertia responses:Lazy Properties
This package supports lazy properties, which align perfectly with Inertia’s lazy data evaluation and deferred props.Three Types of Lazy Properties
- Lazy::inertia() - Never included on first visit, optionally included on partial reloads
- Lazy::closure() - Always included on first visit, optionally included on partial reloads
- Lazy::inertiaDeferred() - Included when ready, optionally included on partial reloads
Including Properties in JavaScript
Deferred Property Groups
Group deferred properties to load them together:artist and lyrics are grouped together as 'details' and will load simultaneously.
Auto Lazy Inertia Properties
Automatically make properties lazy using attributes:Class-Level Attributes
Apply to all properties at once:Deferred Groups with Attributes
Specify groups forAutoInertiaDeferred: