In javascript I could write some code like:
var app_state={"context":"loading"};
$.get("")
.then(function(data){
app_state["data"]=data;
})
.then(change("context", "edit"))
.then(render)
In Clojurescript, I'd like something like:
(-> @app-state
(assoc :context "loading")
(assoc :data (GET "")) ;;async call
(assoc :context "edit")
(render))
Not like:
(defn handler [] ...
(GET "" {:handler handler}