 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Components
-
-;; (defui Competition
-;;   Object
-;;   (render
-;;    [this]
-;;    (dom/div nil "Hi mom I'm a competition")))
-
-;; (def competition (om/factory Competition))
 
 (defui Competition
   Object

    ;;   #js {"Content-Type" "application/transit+json"})
    ))

(def reconciler
  (om/reconciler
    {:state conn
     ;:remotes [:remote]
     :parser (om/parser {:read read :mutate mutate})
     ;:send (transit-post "x") ;(fn [x y] (log (str "Sending to server: x" x " y: " y)))
     }))

;; (om/add-root! reconciler

;; read operations should follow a mutation. :tempids will be discussed later. 
;; Mutations can easily change multiple aspects of the application (think Facebook "Add Friend"). 
;; Adding :value with a :keys vector helps users identify stale keys which should be re-read.
;; (defmethod mutate 'app/name
;;   [{:keys [state]} _ _]
;;   {:value {:keys [:competition/name]}
;;    :action (fn [] (d/transact! state [{:db/id 1 :competition/name "B"}]))})

(defmethod mutate 'app/name
  [{:keys [state]} _ _]
  {:value {:keys [:app/competitions]}
   :action (fn [] (chsk-send! [:event-manager/query [[:competition/name :competition/location]]]))})

(defn test-query-click [t]
  (do
