Skip to main content
Full Stack Radio

127: Jonathan Reinink - Building Modern Monoliths with Inertia.js

96 min episode · 2 min read
·

Episode

96 min

Read time

2 min

AI-Generated Summary

Key Takeaways

  • Server-side routing with client-side rendering: Inertia maintains traditional controller-based architecture where developers return component names and props instead of blade templates. Initial requests return HTML, but subsequent navigation sends JSON responses containing only the component name and data needed, keeping the Vue or React instance alive throughout.
  • Automatic asset versioning: Inertia solves stale asset problems by passing an MD5 hash of the asset manifest with each request. When the server detects mismatched versions between client and server, it automatically triggers a full page reload to fetch updated JavaScript and CSS, while preserving flash messages and form data through intelligent reflashing.
  • Form handling without APIs: Developers submit forms using inertia.post() methods that follow server-side redirects automatically. Validation errors flash to session and return as props to the same page component, displaying reactively without manual state management. Successful submissions redirect to new pages, maintaining the traditional server-side workflow without custom AJAX handlers.
  • Preserve state for interactive elements: Adding a preserve-state attribute to links prevents Vue or React from destroying the component during navigation. This maintains scroll positions, form input values, and focus states when filtering or searching on the same page, as only props update while local component state persists throughout the interaction.
  • Persistent layouts for media players: Inertia renders layout components independently from page components rather than as children, preventing audio players or scrollable sidebars from resetting during navigation. This architecture enables Spotify-like experiences where media continues playing while users browse different pages, matching traditional SPA capabilities without API complexity.

What It Covers

Jonathan Reinink explains Inertia.js, a protocol enabling developers to build single-page applications using Vue, React, or Svelte with traditional server-side frameworks like Laravel or Rails, eliminating the need for separate APIs while maintaining modern interactive experiences.

Key Questions Answered

  • Server-side routing with client-side rendering: Inertia maintains traditional controller-based architecture where developers return component names and props instead of blade templates. Initial requests return HTML, but subsequent navigation sends JSON responses containing only the component name and data needed, keeping the Vue or React instance alive throughout.
  • Automatic asset versioning: Inertia solves stale asset problems by passing an MD5 hash of the asset manifest with each request. When the server detects mismatched versions between client and server, it automatically triggers a full page reload to fetch updated JavaScript and CSS, while preserving flash messages and form data through intelligent reflashing.
  • Form handling without APIs: Developers submit forms using inertia.post() methods that follow server-side redirects automatically. Validation errors flash to session and return as props to the same page component, displaying reactively without manual state management. Successful submissions redirect to new pages, maintaining the traditional server-side workflow without custom AJAX handlers.
  • Preserve state for interactive elements: Adding a preserve-state attribute to links prevents Vue or React from destroying the component during navigation. This maintains scroll positions, form input values, and focus states when filtering or searching on the same page, as only props update while local component state persists throughout the interaction.
  • Persistent layouts for media players: Inertia renders layout components independently from page components rather than as children, preventing audio players or scrollable sidebars from resetting during navigation. This architecture enables Spotify-like experiences where media continues playing while users browse different pages, matching traditional SPA capabilities without API complexity.

Notable Moment

Reinink reveals that browser AJAX requests automatically follow server redirects, enabling Inertia's form submission pattern. When a create-user endpoint validates data and redirects to an index page, the client receives the index page response without knowing the intermediate redirect occurred, perfectly mimicking traditional server-side form behavior while maintaining SPA responsiveness.

Know someone who'd find this useful?

You just read a 3-minute summary of a 93-minute episode.

Get Full Stack Radio summarized like this every Monday — plus up to 2 more podcasts, free.

Pick Your Podcasts — Free

Keep Reading

More from Full Stack Radio

We summarize every new episode. Want them in your inbox?

Similar Episodes

Related episodes from other podcasts

This podcast is featured in Best Cybersecurity Podcasts (2026) — ranked and reviewed with AI summaries.

You're clearly into Full Stack Radio.

Every Monday, we deliver AI summaries of the latest episodes from Full Stack Radio and 192+ other podcasts. Free for up to 3 shows.

Start My Monday Digest

No credit card · Unsubscribe anytime