     )
 
   Object
+  (componentDidMount [this]
+                     (go-loop [new-query (<! routes-chan)]
+                                             (println "new query"
+                                                      new-query)
+                                (om/set-query!
+                                  this
+                                  new-query
+                                  )
+
+                              (recur (<! routes-chan))
+                       )
+                     )
+
   (render [this]
           (let [unbound-query (om/query this)
                 unbound-params (om/params this)


;; Components

(defui RootView
  static om/IQueryParams
  (params [_]

    (let [parsed-url (parse-url-hash
          js/window.location.hash
          )
          new-query (get-query-and-params-by-parsed-url
        tabs
        parsed-url
        )
          ]
      (put! routes-chan new-query)
      )
    )
  )
