Behavior cookbook

Server-rendered requests

Compare the built-in vsn-get attribute with an async CFS function that owns request state.

fragments + async

Direct vsn-get

The response is swapped into a target and any VSN behavior in the fragment is processed.

Loading direct fragment…

Direct request failed:

Nothing loaded yet.

Async CFS request

This path makes loading, success, and failure explicit in local state.

Loading fragment…

Request failed:

The fragment loaded successfully.

Choose a request above.

The direct request also sends partial-request headers such as HX-Request and HX-Target.