I’ve been using .net and hotwire for about a year now, and I quite like them together. I stumbled into your repo a while back. It’s great to have a place with some examples, good job! Let me know if you need any help with more examples down the road. Have you done any work on a NuGet package yet? I think it would be great for making the barrier of entry lower.
Feel free to add issues to your GitHub repository. I’d love to help. There’s a project I have planned that a Hotwired ASP.NET Nuget package would be perfect for!
@krebil@colinkiama There’s not that much in that class library yet but maybe if more gets added on that level I could look into creating a package…
I’ve added some more samples and changed the setup a bit. View Components seem like a great fit to combine with Streams. See this new example: Player list page
@krompaco I think the package you linked here has some good ideas. A TurbostreamResult and tagHelpers are both really good features for a package. I would be hesitant to use something like that in production unless it got way more usage or I was a contributor. I’m always afraid that they will lose stop being worked on in the near future.
I’ve collected a bunch of the helpers that I often add to my projects in case anyone is interested. I’ll probably make it into a NuGet package for my own benefit in a few days.
Let me know if you spot anything that’s missing.
I did some work to use dotnet 8 Preview 6 and Blazor SSR instead of Razor Pages
Will polish further closer to the release but already feels good.
The Blazor component model is very nice and support to render components to strings comes in handy with Turbo streams.
I’ve updated my package (GitHub - krebil/Hotwired-dot-net). I added some opt-in middleware for turbo frame requests. This will strip all the html (except for the turbo-frame itself and whatever turbo-streams may be present) to reduce the payload size before sending the response.
I think this can simplify my workflow so that my views can always render whole pages and then this can pick out the important parts whenever a frame requests a view. Sometimes I’ve had pretty big views which has tempted me to make frame specific endpoints, this alleviates that somewhat.