L5E docscontent/19-swap-and-action.md

Swap + Action

  • defineAction({ method, handler }) in actions.tsx; handler returns JSX.
  • Client transform turns the import into a fetch('/_l5e/action/<name>_<hash>') stub.
  • createSwap({ trigger, target, swap, action }) wires the click → fetch → DOM patch.