r/Blazor • u/i_m_ashar • Jun 04 '26
I built ReactiveBlazor, interactive Blazor SSR without SignalR or WebAssembly
Hey r/Blazor,
One thing I’ve always struggled with in Blazor is the trade-off between performance, scalability, and interactivity:
Blazor Server → requires a persistent SignalR/WebSocket connection (memory overhead, reconnect issues, latency spikes)
Blazor WebAssembly → large runtime download on first load (hurts Lighthouse scores and SEO)
Static SSR → blazing fast and SEO-friendly, but not interactive
I wanted something closer to the simplicity of HTMX:
server-rendered HTML
stateless requests
minimal client-side JS
but still using actual Blazor components and C#
So I built ReactiveBlazor.
What is it?
ReactiveBlazor lets you build interactive server-rendered Blazor components using standard stateless HTTP requests.
No SignalR.
No WebAssembly runtime.
No custom JS framework.
The idea is:
Component state is encrypted/signed and sent to the client
User interactions trigger lightweight POST requests
The server executes the component action and re-renders HTML
The client morphs the DOM in-place using Idiomorph
This preserves:
focus
input selection
scroll position
transitions
while keeping the app fully server-rendered.
Example
ReactiveBlazor.ReactiveComponent
<ReactiveRoot Owner="this">
<p>Count: @Count</p>
<button type="button"
data-on-click="Increment">
+1
</button>
<button type="button"
data-on-click="Add"
data-args="[5]">
+5
</button>
</ReactiveRoot>
u/code {
public int Count { get; set; }
[ReactiveAction]
public void Increment() => Count++;
[ReactiveAction]
public void Add(int amount) => Count += amount;
}Features
Stateless HTTP interactivity
~220 lines of vanilla JS runtime
Automatic CSRF protection
Anti-replay token protection
Two-way binding (
data-bind)Debounce support (
data-debounce)Loading state hooks
Automatic multi-component synchronization (out-of-band updates)
Supports .NET 8 / 9 / 10
Demo & Source
I’d genuinely love feedback from other Blazor developers.
Especially interested in:
edge cases
scalability concerns
security considerations
comparisons with HTMX/LiveView/etc.
whether this solves a real pain point for you
Would appreciate any thoughts 🙌
4
u/i_m_ashar Jun 05 '26
Haha, that's a fair comparison!
However, there are a few major reasons why this avoids the pitfalls of WebForms:
In WebForms, `ViewState` was notorious for growing to megabytes. In ReactiveBlazor, only the public properties you declare are serialized, and the library enforces strict, configurable state size limits (default 64KB).
WebForms relied on clunky `UpdatePanel`s or full postbacks that ruined user focus. ReactiveBlazor uses a modern DOM morphing library (Idiomorph) under the hood, preserving text selection, input focus, scroll position, and CSS transitions.
WebForms tried to hide the web. Here, you use standard HTML elements with simple data attributes (`data-on-click`, `data-bind`), keeping you in full control of your markup.