(defcomp
  ()
  (~docs/page
    :title "Imperative Pattern"
    (p
      "For complex reactivity (dynamic classes, conditional text), use the imperative pattern: "
      (code "create-text-node")
      " + "
      (code "effect")
      " + "
      (code "dom-set-text-content")
      ".")
    (~reactive-islands/index/demo-imperative)
    (~docs/code
      :src (highlight
        (component-source "~reactive-islands/index/demo-imperative")
        "lisp"))
    (p
      "Two patterns exist: "
      (strong "declarative")
      " ("
      (code "(span (deref sig))")
      " — auto-reactive via "
      (code "reactive-text")
      ") and "
      (strong "imperative")
      " ("
      (code "create-text-node")
      " + "
      (code "effect")
      " — explicit, full control). Use declarative for simple text, imperative for dynamic classes, conditional DOM, or complex updates.")))
