In this episode, we take a close look at one of the breaking changes in Inertia version 2: partial reloads are now asynchronous! If you've been used to how partial reloads worked in v1 (they were synchronous, and any previous requests would get cancelled if you made a new one), this update is going to feel a bit different.
We start by building a simple example using Inertia v1 to demonstrate the old, synchronous behavior. Basically, we set up a dashboard with a reload button and an optional delay, so we can see the effect in real time. When making a request with a long delay (say, three seconds), if you click another button that triggers a new partial reload, the original (slow) request gets cancelled and the new one takes over. This is the synchronous pattern from v1.
Then, we switch over to Inertia v2, update our dependencies, and try out the same scenario. You'll notice a key change: both requests run at the same time! Clicking the reload button multiple times queues up multiple requests, and each one completes independently, no matter the timing. That's async partial reloads in action.
We wrap up by explaining the changes and offering some advice: if your app's logic relies on the old synchronous behavior (like cancelling data loads or showing only the latest requested data), you'll want to audit your code. While it's rare to depend on the old behavior, it's really good to be aware of this difference when you update to v2.