                (dom/button #js {:onClick #(add-item app owner)} "Add item")
                (apply dom/ul nil
                       (om/build-all visible-item-view
-                                    (filter (fn [[i _]] (in? (:visible app) i)) (:items app))))))))
+                                    (filter (fn [[i _]] (in? (:visible app) i))
+                                            (:items app))))))))
 
-;; TODO HEREATM What is dispatch supposed to do?
-;; This is buggy
+;; TODO: Put action on channel and then do something there
 (defroute "/notes/:id" {:as params}
-  (om/transact! @app-state :hidden #(assoc % :item false))
-  (om/transact! @app-state :current-item (fn [_] (:id params)))
+  #_(om/transact! @app-state :hidden #(assoc % :item false))
+  #_(om/transact! @app-state :current-item (fn [_] (:id params)))
   (js/console.log (str "Viewing item: " (:id params))))
-  
 
 (defn main []
   (om/root app-view

      (dom/div #js {:style (hidden (-> app :hidden :item))}
               (str (-> app :item))))))

(defn app-view [app owner]
  (reify
    om/IRenderState
    (render-state [this state]
      (dom/div nil
               #_(dom/h1 nil (str (:text app) " " (:count state)))
               (dom/a #js {:href "#/users"} "Users") ;;   <p><a href="#/users">Users</a></p>
               (dom/p nil
                      (str "Search: ")
                      (dom/input #js {:value (:search state)
                                      :type "text"
                                      :ref "search"
                                      :onChange #(handle-search-change % owner state)})
                      (dom/button #js {:onClick #(search app owner)} "Search"))
               (dom/textarea #js
                              {:value (:text state)

(ns unfolds.core
  (:require-macros [cljs.core.async.macros :refer [go]]
                   [secretary.core :refer [defroute]]
                   [cljs.core.async.macros :as asyncm :refer (go go-loop)])
  (:require [clojure.set :refer [union]]
            [clojure.string :refer [split]]
            [goog.events :as events]
            [cljs.core.async :as async
             :refer (<! >! put! chan sliding-buffer timeout alts!)]
            [om.core :as om :include-macros true]
            [om.dom :as dom :include-macros true]
            [cljs.core.async :refer [put! chan <!]]
