Closed sregdorr closed 7 months ago
Thanks for the kind words. You are not missing something, we are actively working on this. Check out https://github.com/egil/Htmxor/issues/25 and add your input there. Ill close this issue as the other one covers this topic.
Hello @egil! I love what you're doing here! I have no doubt this will be an amazing contribution to the Blazor ecosystem!
I was trying to learn the ideas/concepts behind this library and even though I have started utilizing htmx in a few of my projects, reading through your code samples was the first time I had run across the idea of template-fragments. I love it! that's so much more concise than having to deal with directories of component partials.
That being said, I noticed some weird behavior regarding your
<HtmxPartial>
component. Riffing off of your./samples/MinimalHtmxorApp/Components/Pages/Counter.razor
component, I was playing with this test component to try to see how you would use multiple<HtmxPartial>
's in a single component:Looking at the code, I was expecting that on a counter button click, I would get a response from the server that patched simply the
div#counter
element (which is exactly what happens), and after 5 seconds when thediv#test
triggers, it would be patched with the contents of the second<HtmxPartial>
. However, it actually gets patched with the content of the counter partial:Am I misunderstanding how the
<HtmxPartial>
component is supposed to work? Is it not intended to be used multiple times within a single component? Is there some way of naming/identifying the individual instances such that the Renderer can tell the difference when patching the DOM?Thanks again for your work on this! I'm excited to follow your progress!