     [timothypratley.patchin :refer [diff patch]]
     ))
 
-(defonce push-pending? (atom false))
-
-(def client-state-push-to-server-keys [:current-page])
-
-(add-watch
-  client-state :set-push-pending
-  (fn [_ _ old-state new-state]
-    (when (not= (select-keys old-state client-state-push-to-server-keys)
-                (select-keys new-state client-state-push-to-server-keys))
-      (reset! push-pending? true))))
 
 (declare chsk ch-chsk chsk-send! chsk-state)
 

    (chsk-send! [:front/routing-state (dissoc @state/routing-state* :page)]
                1000
                (fn [reply]
                  (js/console.log (with-out-str (pprint ["push-routing-state-to-server!/reply" reply])))
                  (when-not (sente/cb-success? reply)
                    (set-push-routing-state-pending))))
    (set-push-routing-state-pending)))

  (sente/start-chsk-router! ch-chsk event-msg-handler)
  ; doesn't work here because socket is not open yet
  (start-push-routing-state-to-server)
  )


