Blazor's .NET 8 Static Server Rendering mode can be combined with HTMX to deliver interactive client-side experiences without WebSockets or WebAssembly. The post walks through setting up HTMX in an ASP.NET Core Blazor project, porting the classic Counter component to use HTMX's hypermedia approach, and wiring up a minimal API endpoint to manage state and return HTML fragments. The result is visually indistinguishable from an Interactive Server component but requires no persistent connections and less infrastructure overhead.
Table of contents
What is HTMX?What are Blazor Server-Rendered Components?Let’s Use HTMX with BlazorConclusion1 Impression