   (:require [quiescent :as q :include-macros true]
             [quiescent.dom :as d]))
 
+(enable-console-print!)
+
 (q/defcomponent User
   [data header-meta]
   (apply d/tr {}
-         (map (fn [key] (d/td {} (get data key))) (map :key header-meta))))
+         (map (fn [header] (d/td {} (if(get header :renderer)
+                                      (#((get header :renderer) (get data (get header :key))))
+                                      (get data (get header :key)))))
+              (partial header-meta))))
 
 (defn render-header [header]
   (d/thead {}
            (apply d/tr {}
-                  (map (fn [h] (d/th {:className (:className h) 
+                  (map (fn [h] (d/th {:className (:className h)
                                       :onClick (:onClick h)} (:title h)))
                        header))))
 

  (if (= identity f)
     reverse
     identity))
  
(defn column-sorter [column]
  (swap! sort-order reverse-sort)
  (update-in my-data [:data] (fn [data] (@sort-order  (sort-by column data)))))

                      :country "France"}]
              :meta {:header
                     [{:key :email :title "Email" :className "email" :onClick
                       (create-sorter column-sorter :email) :renderer (create-email-column-renderer)}
                      {:key :name :title "Name"
                       :onClick
                       (create-sorter column-sorter :name)}
