(defcomp
  ()
  (~docs/page
    :title "Shared Stores"
    (p
      "React uses "
      (code "Context")
      " or state management libraries for cross-component state. SX uses "
      (code "def-store")
      " / "
      (code "use-store")
      " — named signal containers that persist across island creation/destruction.")
    (~reactive-islands/index/demo-store-writer)
    (~reactive-islands/index/demo-store-reader)
    (~docs/code
      :src (highlight
        (str
          (component-source "~reactive-islands/index/demo-store-writer")
          "\n\n"
          (component-source "~reactive-islands/index/demo-store-reader"))
        "lisp"))
    (p
      "React equivalent: "
      (code "createContext")
      " + "
      (code "useContext")
      " or Redux/Zustand. Stores are simpler — just named dicts of signals at page scope. "
      (code "def-store")
      " creates once, "
      (code "use-store")
      " retrieves. Stores survive island disposal but clear on full page navigation.")))
