Announcing Inertia 2.0: Redefining Frontend Development for Laravel

Published on by

Announcing Inertia 2.0: Redefining Frontend Development for Laravel image

We're excited to announce the stable release of Inertia 2.0, bringing significant improvements to how you build software with Laravel. This release is part of our continued investment in making the frontend development experience with Laravel as productive and enjoyable as possible.

New features in Inertia 2.0 include async requests, deferred props, prefetching, polling. Follow this guide to upgrade. For a quick overview, check out Josh Cirre's 3 minute video walk through.

Inertia was created so backend developers can easily use popular frontend frameworks such as React, Vue, and Svelte without needing to build an API. Inertia acts as a bridge between your server-side application and your JavaScript frontend, enabling you to build single-page applications while still enjoying Laravel’s robust server-side routing and ORM.

What's New in Inertia 2.0

At the core of Inertia 2.0 is a completely rewritten request handling layer that enables asynchronous requests. This foundational change unlocks several powerful new features while maintaining Inertia's seamless integration between Laravel backends and the frontend frameworks React, Vue, and Svelte.

Asynchronous Requests

Previously, all Inertia requests were synchronous. With 2.0, you now have full support for asynchronous operations, opening new possibilities for building responsive interfaces.

The new async request system allows multiple requests to happen simultaneously without canceling each other. For example, the existing reload method is now async by default, providing a more fluid user experience, especially when dealing with background data updates or form submissions.

// Disables progress indicator
// Doesn’t cancel other outgoing requests
router.reload({ only: ['users'] })

Async requests enable features like lazy loading via the WhenVisible component, which optimizes initial page load times by deferring data fetching until components are actually visible to the user.

Deferred Props

Load non-critical data after the initial page render, reducing time to first byte in your applications, improving Core Web Vitals like Largest Contentful Paint. Applications with the following attributes will especially benefit:

  • Pages with expensive database queries
  • Sections requiring external API calls
  • Large data sets that aren't immediately visible
  • Components consuming multiple data sources

Prefetching

Prefetch data for pages that are likely to be visited next. This can be useful for improving the perceived performance of your app by allowing the data to be fetched in the background while the user is still interacting with the current page.

  • Hover prefetching: Pages are prefetched when users hover over links, making them load instantly when clicked
  • Mount prefetching: Pages can be prefetched as soon as the original page loads
  • Stale-while-revalidate pattern: Pages can be served instantly from cache and then gracefully updated with fresh data in the background

Polling

Keep your UI in sync with server state using the new polling helpers. The usePoll helper makes it simple to implement automatic data refreshing with smart features like:

  • Automatic start/stop when components mount/unmount
  • Throttling when browser tabs are inactive
  • Manual polling control with start/stop callbacks
  • Configurable polling intervals

Getting Started

We’ve made upgrading as smooth as possible with virtually no breaking changes between Inertia 1.x and 2.0.

Check out our Upgrade Guide for detailed information about these new features and how to implement them in your app.

What's Next

This release is just the beginning. We're already working on Inertia 2.1, which will introduce infinite scrolling capabilities and other exciting features. Stay tuned for more updates.

Feedback on our docs, 2.0, or anything else Inertia? Let us know at @laravelphp & @inertiajs. For peer support, join the Laravel Discord and post in #help.

Joe Tannenbaum photo

Open Source Engineering Lead at Laravel. Constantly tinkering, always curious. Full stack engineer, speaker, meetup organizer.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

Laravel Forge logo

Laravel Forge

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Forge
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $7500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
Laravel Idea for PhpStorm logo

Laravel Idea for PhpStorm

Ultimate PhpStorm plugin for Laravel developers, delivering lightning-fast code completion, intelligent navigation, and powerful generation tools to supercharge productivity.

Laravel Idea for PhpStorm
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $2500/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Lunar: Laravel E-Commerce logo

Lunar: Laravel E-Commerce

E-Commerce for Laravel. An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

Lunar: Laravel E-Commerce
LaraJobs logo

LaraJobs

The official Laravel job board

LaraJobs
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Supercharge Your SaaS Development with FilamentFlow: The Ultimate Laravel Filament Boilerplate logo

Supercharge Your SaaS Development with FilamentFlow: The Ultimate Laravel Filament Boilerplate

Build your SaaS application in hours. Out-of-the-box multi-tenancy and seamless Stripe integration. Supports subscriptions and one-time purchases, allowing you to focus on building and creating without repetitive setup tasks.

Supercharge Your SaaS Development with FilamentFlow: The Ultimate Laravel Filament Boilerplate
JetShip - Laravel Starter Kit logo

JetShip - Laravel Starter Kit

A Laravel SaaS Boilerplate and a starter kit built on the TALL stack. It includes authentication, payments, admin panels, and more. Launch scalable apps fast with clean code, seamless deployment, and custom branding.

JetShip - Laravel Starter Kit
Rector logo

Rector

Your partner for seamless Laravel upgrades, cutting costs, and accelerating innovation for successful companies

Rector
MongoDB logo

MongoDB

Enhance your PHP applications with the powerful integration of MongoDB and Laravel, empowering developers to build applications with ease and efficiency. Support transactional, search, analytics and mobile use cases while using the familiar Eloquent APIs. Discover how MongoDB's flexible, modern database can transform your Laravel applications.

MongoDB

The latest

View all →
Announcing Inertia 2.0: Redefining Frontend Development for Laravel image

Announcing Inertia 2.0: Redefining Frontend Development for Laravel

Read article
Converting Collections to Queries in Laravel Using toQuery() image

Converting Collections to Queries in Laravel Using toQuery()

Read article
Dynamic Page Updates with Laravel Blade Fragments image

Dynamic Page Updates with Laravel Blade Fragments

Read article
Using Fluent to Work With HTTP Client Responses in Laravel image

Using Fluent to Work With HTTP Client Responses in Laravel

Read article
Managing Concurrent Requests with Laravel Session Blocking image

Managing Concurrent Requests with Laravel Session Blocking

Read article
URI Parsing and Mutation in Laravel 11.35 image

URI Parsing and Mutation in Laravel 11.35

Read article