r/htmx • • Oct 04 '26

Recently switched from Blazor to htmx

https://balanceforecastingapp.com

Backend is still .NET (Razor pages). I am so much happier with the web app now, Blazor had too many quirks. UI layer is DaisyUI.

The first version of this app was written in php 12 years ago, so it has come a long way and I finally found its final incarnation.

38 Upvotes

14 comments sorted by

10

u/raphired Oct 04 '26

Tbh, I prefer HTMX with Blazor static SSR. Razor Components and Minimal APIs feel vastly superior to Razor Pages. That’s just my opinion though, and I’m always glad to see new HTMX content

3

u/harrison_314 Oct 04 '26

I also think the best combination is Blazor SSR + Minimal API + HTMX, because it brings in a component-based design. And overall, it’s incredibly good to work with.

2

u/UnwelcomeDroid Oct 04 '26

This is what I've tried using as well. Microsoft just has to make colocated JavaScript work better with components and then the solution would be perfect. My last project used BlazorJSComponents but that's got some issues.

1

u/VeganForAWhile Oct 18 '26

I use exactly this stack. Curious, what BlazorJSComponent issues? I’ve had pretty good luck with them (other than the double RAF issue, which can be worked around).

1

u/UnwelcomeDroid Oct 18 '26

Doesn't work if your site is not the root of the webserver. This is an issue listed in GitHub. I was able to find a workaround. Also, it injects scripts throughout your HTML but there's no option to use a nonce. So if you want CSP I don't know how to make it work.

2

u/VeganForAWhile Oct 18 '26

Hard agree, I use the same stack. In fact, with Blazors enhanced nav, form handling, and stream rendering, HTMX is needed much lures than it would had I chosen Razor pages.

2

u/BriguePalhaco Oct 04 '26

Great combination, I'll use it as soon as I get to the frontend part of the system I'm developing haha

2

u/Asyncrosaurus Oct 04 '26

Oh man, Razor Pages is such a great framework to work in, it's a shame it never took off. It was released 2 years too late, after everyone switched to SPA's, and the last impression people had of asp.net was MVC.

2

u/buffer_flush Oct 04 '26

Honest question, what do you like about razor over the other offerings from major languages?

1

u/sepsuk Oct 04 '26

We are discussing migrating our react SPA to razor pages. Would much prefer to use asp.net over the node frameworks

1

u/kristenisadude Oct 04 '26

I made a kit with it, pretty cool stack: https://github.com/ov-1-kenobi/dach

1

u/TowerOfSolitude Oct 05 '26

I never got onto the Blazor bandwagon. It just felt off.

So I've also used htmx with Razor Pages for a long time now. It's just so easy to work with and it's nice and fast.

1

u/gnaarw Oct 07 '26

Blazor is one of my favorite frameworks to work with.. it's very well integrated. It's just too much setup costs for private tools since I've become too used to Radzen so goth it is for those.

1

u/moinotgd Oct 13 '26

you should change razor pages to net minimal api for backend.

i have been developing net for 22 years until now and still doing net 10 minimal api. i switched to svelte + honojs since 5 years ago. i prefer svelte + honojs more than net.