 (defn add-atom-sync
   "Carry middleware.
    On start creates a bidirectional sync between the specified atom-like reference and the app model.
-   Is useful for integration with Devcards or for direct hacking with app model in REPL."
+   On stop sync is removed.
+   Current reference values are not updated until one of the references changes.
+   Is useful for direct hacking with app model in REPL and for integration with Devcards."
   [spec r]
   (-> spec
       (update :control

;;;;;;;;;;;;;;;;;;;;;;;;
(defn -connect-atom
  [r model dispatch-signal]
  ; sync from reference for the first time
  (dispatch-signal [::on-reset @r])

  #_(println "1 DATA ATOM WATCHES = " (pr-str (count (.-watches r))))

  ; sync model from reference
  (add-watch r
             model

             r
             (fn [_key _ref _old-state new-state]
               (when (not= @r new-state)
                 (reset! r new-state)))))

(defn -unconnect-atom
  [r model]
