     om/IInitState
     (init-state [_]
       {:url-input-text ""
+       :search-text ""
        :ws-in (chan)})
     om/IWillMount
     (will-mount [_]

              (recur package))))))
    om/IRenderState
    (render-state [this state]
      (bookmarks (:bookmarks app) owner state))))


(om/root

   [:.url-ts] (content (.toLocaleString ts))})


(deftemplate bookmarks "templates/bookmarks.html"
  [app owner state]
  {[:#bm-header] (content "Recent bookmarks")
   [:#url-input] (do-> (set-attr :value (:search-text state))
                       (listen :on-change #(handle-text-change % owner :search-text)
                               ;; :on-key-down #(if (= (.-keyCode %) 10) #_(send-bookmark state owner) (when (= (.-which %) 13) (when (.-ctrlKey %) (send-bookmark state owner))))
                               ))
   [:#url-list] (content (map #(url %) (sort-by :ts > app)))
   [:#bookmark-btn] (listen :on-click (fn [e]
                                        (println "Yes, my lord?")
                                        #_(send-bookmark state owner)))})


;; --- INIT ---
