   [key]
   (om/transact! reconciler `[(change/view {:view ~key})]))
 
+(defn loading?
+  "Return boolean if ajax request is still in process."
+  []
+  (get-in @app-state [:app :loading?]))
+
+(defn loading!
+  "Set boolean if ajax request is still in process. Defaults to true without parameters."
+  ([bool]
+   (om/transact! reconciler `[(app/loading {:status ~bool})]))
+  ([] (loading! true)))
 
 ;;;; Error messages
 (defn error?

  []
  (get-in @app-state [:user :logged-in?]))


;;;; About views
(defn current-view

  [{:keys [state]} _ {:keys [view]}]
  {:action (fn [] (swap! state update-in [:user :view] (fn [] view)))})

(defmethod mutate 'app/loading
  [{:keys [state]} _ {:keys [status]}]
  {:action (fn [] (swap! state update-in [:app :loading?] (fn [] status)))})

(defmethod mutate 'update/error
    [{:keys [state]} _ {:keys [message]}]
    {:action (fn [] (swap! state update-in [:error :message] (fn [] message)))})

(defmethod mutate 'user/logged-in
  [{:keys [state]} _ {:keys [status]}]
  {:action (fn [] (swap! state update-in [:user :logged-in?] (fn [] status)))})

(defonce reconciler
         (om/reconciler
