Played around using core.async in ClojureScript for coordinating async AJAX requests and app state updates. See this gist for more code and explanation.
(defrecord Controller [state router] view/ControllerProtocol (on-navigation [_ file-id] (go (try (chain (<?initialize-state! state) (<?set-current-file! state file-id router)) (catch js/Object e (println "!!! ERROR - on-navigation - caught" (if (channel-error? e) (str "error from some channel, error data: " (channel-error-data e)) (str "js exception: " e))))))) (on-change-current-file [_ file-id] (go (try ; <? is needed to wait for result or raise an exception (<? (<?set-current-file! state file-id router)) (catch js/Object e (.error js/console "on-change-current-file exception:" e))))))