egil / Htmxor

Supercharges Blazor static server side rendering (SSR) by seamlessly integrating the Htmx.org frontend library.
MIT License
109 stars 12 forks source link

feat: HtmxLazy component #34

Closed egil closed 2 months ago

egil commented 2 months ago

@tanczosm this works, but is this a valuable component?

I dislike the hidden magic of Weather.razor not rendering its elements on an hx-request. Not that it works this way, but that it is not obvious to the developer.

tanczosm commented 2 months ago

This component has value, but probably not as written at the present time.

In trying to document rules for HtmxSwappable I think HtmxSwappable and HtmxLazy should probably be two components so you are on the right path. HtmxSwappable is meant to act as a container for content you may individually swap into in the future. The lazy loading logic in HtmxSwappable complicates it's usage and is trying to do too much at once.

Let's strip HtmxSwappable of lazy loading and put HtmxLazy on hold for a bit to focus first on what HtmxSwappable would be. Give me a moment to play around with the code and I'll report back.