ReactDotNetCore.AspNetCore 0.2.0

dotnet add package ReactDotNetCore.AspNetCore --version 0.2.0
                    
NuGet\Install-Package ReactDotNetCore.AspNetCore -Version 0.2.0
                    
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="ReactDotNetCore.AspNetCore" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ReactDotNetCore.AspNetCore" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="ReactDotNetCore.AspNetCore" />
                    
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 ReactDotNetCore.AspNetCore --version 0.2.0
                    
#r "nuget: ReactDotNetCore.AspNetCore, 0.2.0"
                    
#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 ReactDotNetCore.AspNetCore@0.2.0
                    
#: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=ReactDotNetCore.AspNetCore&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=ReactDotNetCore.AspNetCore&version=0.2.0
                    
Install as a Cake Tool

ReactDotNetCore.AspNetCore

Use React components as ASP.NET Core MVC views — server-side rendered and hydrated — without a separate Web API, Next.js app, or SPA. Keep your existing controllers, services, repositories, and view models; replace only the view layer.

public IActionResult Detail(int id)
{
    var model = _userService.GetUser(id);   // unchanged domain code
    return this.ReactView<UserProfile>(model);
}
// Views/UserProfile.tsx
export default function UserProfile(props: UserDto) {
  return <h1>{props.name}</h1>;
}

How it works

A controller returns a ReactDotNetCoreResult. The engine serializes the model to camelCase JSON props, asks a managed Node SSR sidecar to render the component to HTML, and returns a full page with the markup, the embedded props, and the hydration script. The browser hydrates with the same component + props.

  • Production: the sidecar imports the Vite-built SSR bundle; the page links hashed assets from the Vite manifest.
  • Development: the sidecar runs a Vite dev server, rendering on the fly with HMR — edit a .tsx and the browser hot-reloads, no rebuild.

The companion npm package @react-dotnetcore/runtime provides the JS side (registry, SSR renderer, hydration, sidecar).

Setup

builder.Services.AddReactDotNetCore();   // options: dev mode, ports, timeouts, paths, JSON
app.UseStaticFiles();              // serves the built client assets from wwwroot

Production hardening built in: auto free-port selection, sidecar health-gating, crash auto-restart, render timeouts, graceful shutdown, loopback-only sidecar, safe <script> props escaping, and no SSR stack-trace leakage in Production.

See the repository README for the full walkthrough, project structure, and the sample app.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 67 6/22/2026
0.1.0 65 6/22/2026