   ;; optionally touch your app-state to force rerendering depending on
   ;; your application
   ;; (swap! app-state update-in [:__figwheel_counter] inc)
-)
+  )

  (str last ", " first (middle-name contact)))

(defn contact-view [contact owner]
  (reify om/IRender 
    (render [this]
      (dom/li nil 
              (dom/span nil (display-name contact))
              (dom/button nil "Delete")))))

(defn contacts-view [data owner]
  (reify om/IRender
    (render [this]
      (dom/div nil
               (dom/h2 nil "Contact list")
               (apply dom/ul nil
                      (om/build-all contact-view (:contacts data)))))))

(om/root contacts-view app-state
         {:target (. js/document (getElementById "contacts"))})

(ns ^:figwheel-always om-tut.core
  (:require-macros [cljs.core.async.macros :refer [go]])
  (:require [om.core :as om :include-macros true]
            [om.dom :as dom :include-macros true]
            [cljs.core.async :refer [put! chan <!]]))

(enable-console-print!)

