Inertia.Net 1.5.3

dotnet add package Inertia.Net --version 1.5.3
                    
NuGet\Install-Package Inertia.Net -Version 1.5.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Inertia.Net" Version="1.5.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Inertia.Net" Version="1.5.3" />
                    
Directory.Packages.props
<PackageReference Include="Inertia.Net" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Inertia.Net --version 1.5.3
                    
#r "nuget: Inertia.Net, 1.5.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Inertia.Net@1.5.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Inertia.Net&version=1.5.3
                    
Install as a Cake Addin
#tool nuget:?package=Inertia.Net&version=1.5.3
                    
Install as a Cake Tool

Inertia.Net

Version 1.5 lets you remove, replace and tag cached props and SSR renders (IInertiaCache), serve them stale while they refresh (staleFor), and keep them in a cache store of your choice (IInertiaCacheStore). Upgrading from 1.3 or earlier? Read the 1.4 upgrade notes: one default changed (redirects to another origin become a full visit). The changelog lists every release. Start a new app with dotnet new install Inertia.Net.Templates and dotnet new inertia.

The core of Inertia.Net, a .NET 10 server adapter for the Inertia.js v3 protocol. It works with Minimal APIs (this package), MVC (Inertia.Net.Mvc) and FastEndpoints (Inertia.Net.FastEndpoints), with the React, Vue and Svelte clients, and is Native AOT and trim compatible.

dotnet add package Inertia.Net
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddInertia(o => o.Share("appName", "Demo"));
builder.Services.AddAntiforgery(o => o.HeaderName = InertiaHeaders.XsrfToken);

var app = builder.Build();
app.UseStaticFiles();
app.UseInertia();
app.UseInertiaAntiforgery();   // XSRF-TOKEN cookie for the client; 419 for mutations without a valid token

app.MapGet("/users", () => Render("Users/Index", new InertiaProps
{
    ["users"] = users,
    ["stats"] = Defer(ct => statsService.GetAsync(ct), group: "sidebar"),
    ["plans"] = Once(ct => plans.AllAsync(ct)).Until(TimeSpan.FromHours(1)),
}));

app.Run();

<!DOCTYPE html>
<html>
<head>@viteReactRefresh @vite("resources/js/app.tsx") @inertiaHead</head>
<body>@inertia</body>
</html>

Render, Defer, Back() and Location(...) are called unqualified: the package adds global using Inertia.Net; and global using static Inertia.Net.Inertia; when ImplicitUsings is enabled (Inertia.Render does not compile outside the Inertia.Net namespace). Opt out with <InertiaNetImplicitUsings>false</InertiaNetImplicitUsings>.

What is in the package: prop factories (lazy, optional, deferred, always, merge, once, scroll) with opt-in parallel loaders and cached props, partial reloads, shared data, flash, history encryption, asset versioning, Vite manifest and dev-server tags, SSR (several servers, a supervised Node process pool, circuit breakers, render slots, per-response modes, metrics and a health check), validation and Precognition for Minimal APIs (WithInertiaValidation(), WithInertiaPrecognition()), CSRF protection (UseInertiaAntiforgery()), an encrypted-cookie state store, an SSR response cache, Vite chunk prefetching and CSP nonces, MapInertia page endpoints, TypeScript declarations from your C# page types, and the Inertia DevTools recorder (AddInertiaDevTools()).

Documentation: https://github.com/adzamkomladev/Inertia.Net#readme

Performance

v1.5.2 allocates less per render than v1.5.1: a JSON page with 20 props drops from 2,152 to 1,736 bytes, a partial reload from 984 to 568 bytes, and a render with 20 parallel loaders from 6,496 to 3,992 bytes. Pages without parallel props also skip the parallel planning walk.

Compared with published v1.5.0, v1.5.1 measured 43.3% faster 1 KiB cache writes, 56.5% faster 1 MiB cache writes, 8.1% faster integer-key dictionary rendering, and 87.0% faster 32-request cold-cache bursts in controlled fixtures. Ordinary JSON, HTML and partial rendering showed no statistically clear slowdown. JSON render allocations fell from 2,760 to 2,152 bytes; partial reload allocations fell from 1,592 to 984 bytes. These are fixture measurements, not production throughput guarantees.

See benchmark results and confidence intervals for package hashes, raw samples and the distinction between the published-release comparison and earlier incremental GC/RSS experiments.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Inertia.Net:

Package Downloads
Inertia.Net.FastEndpoints

FastEndpoints integration for Inertia.Net.

Inertia.Net.Mvc

MVC integration for Inertia.Net: ModelState errors filter, Razor root view and tag helpers (not Native AOT compatible).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.3 108 10/26/2026
1.5.2 117 10/24/2026
1.5.1 136 10/23/2026
1.5.0 109 10/22/2026
1.4.0 127 10/21/2026
1.3.0 122 10/19/2026
1.2.0 108 10/18/2026
1.1.0 117 10/13/2026
1.0.3 140 10/6/2026
1.0.2 104 10/6/2026
1.0.1 119 10/6/2026
1.0.0 122 10/5/2026