esmiralha / express-htmx

Extensions for using htmx with Express.
2 stars 0 forks source link

Support for Out of band swaps #1

Closed checketts closed 1 year ago

checketts commented 1 year ago

Does your library offer a way to render multiple templates so OOB-Swapping is supported?

Example:

<div>main content</div>
<div id="sideThing" hx-swap-oob="true">Other thing</div>

That will put the 'main content' as usual, but also locate the #sideThing somewhere else on the page and swap it out.

esmiralha commented 1 year ago

It does not deal at all with the rendering part of the backend and it makes no assumptions about the rendering. In any case, if you render the template with the proper htmx attributes, then OOB swap will happen as expected.