Quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.

Introducing the ๐šž๐šœ๐šŽ๐™ท๐š๐š๐š™ hook. The same developer experience as useForm, but for plain HTTP requests. Reactive state, error handling, file upload progress, and request cancellation, all without triggering a page visit.
1
40
4,384
Optimistic updates are now built into Inertia. Chain ๐š˜๐š™๐š๐š’๐š–๐š’๐šœ๐š๐š’๐šŒ() before any router visit to apply changes instantly. If the request fails, props revert automatically ๐Ÿ’ซ
1
45
3,145
The new @๐š’๐š—๐šŽ๐š›๐š๐š’๐šŠ๐š“๐šœ/๐šŸ๐š’๐š๐šŽ plugin handles page resolution, code splitting, and SSR setup automatically. Your entire entry point can now be a single function call. SSR in development no longer requires a separate Node.js server either. Just run ๐šŒ๐š˜๐š–๐š™๐š˜๐šœ๐šŽ๐š› ๐š๐šŽ๐šŸ โšก๏ธ
1
54
4,244
Today we're releasing Inertia 3! ๐Ÿš€ It's packed with new features, a better developer experience, and fewer dependencies. Here's what's new ๐Ÿงต
13
64
495
54,772
Lastly, TypeScript users can configure the Flash Data type globally using declaration merging. That way, your page.flash will be fully typed throughout your app ๐Ÿ”’
34
3,184
You can also set Flash Data entirely on the client using router.flash(). New values are merged with existing data, and with a callback, you may access or replace the current state โœจ
1
28
3,631
To handle Flash Data globally, listen to the global flash event. This is ideal for toast notifications managed from a single location like your layout component.
3
34
1,646
Need Flash Data when making requests? Use the onFlash callback. This is great for catching server-generated values like new Model IDs right after form submissions. ๐ŸŽฏ
1
30
1,721
On the frontend, Flash Data is available on the page object. You may access it directly in your components, for example, to show notifications or highlight newly created items. ๐Ÿ’ซ
1
26
1,780
If you're using this for redirects, you can chain back() onto flash(). You can also use Flash Data for regular page renders, and you may call flash() either before or after returning an Inertia response.
2
34
1,975
Ready for another new feature? Introducing Flash Data in Inertia! โšก๏ธ With Flash Data, you can send one-time values to your frontend that won't reappear when users navigate through browser history. Perfect for success messages, newly created IDs, or other temporary values.
24
60
408
56,346
One last thing: Once you've set up Precognition on useForm(), you may simply call form.submit() without any arguments to submit the form. The method and URL are already known. Happy validating! โœจ inertiajs.com/docs/v2/the-baโ€ฆ
1
24
2,298
Previously, when using useForm() with Precognition, you had to install an extra package. As of Inertia 2.3, you can remove it and import useForm() directly from Inertia again. The API stays the same and we added a new method to enable Precognition, plus support for Wayfinder โ›ต๏ธ
1
1
21
2,727
You may also specify which fields to validate, and you can pass success and error listeners. This is great for multistep forms where each step should validate before going to the next one ๐Ÿ‘
1
22
1,189
You may validate fields on events like blur and change, but you can also choose to "touch" fields. Later on, you can simply call validate() to validate all touched fields at once.
1
17
1,307
In Laravel, the only thing you need is a Form Request and the HandlePrecognitiveRequests middleware on the route. That's it! When Laravel receives a precognitive request, it runs your middleware and validation exactly like a real submission, but skips executing the controller.
1
18
1,448
Precognition can be used for various cases, but it's mainly for validating forms as users fill them out before they actually submit the form. It uses your existing server-side validation rules, so there's nothing to duplicate on the client ๐Ÿ’…
1
21
1,618
Today we're bringing Precognition to Inertia's Form component! ๐Ÿ”ฎ And not only in the Form component, we're also bringing it to useForm() out of the box. No additional packages needed anymore.
7
27
198
26,129