                                                      )]
                                 ; ...
                                 (do
-                                  (println "current-tab" current-tab)
                                   (
                                     (om/factory
                                       (:component current-tab))

(defui RootView
  static om/IQueryParams
  (params [_]
          ;initial-params ; here and below, we're passing (pre-computed) value
          ;               ; and not doing function calls
          (merge {}
         (:params (get-query-and-params-by-parsed-url tabs (parse-url-hash
                                               js/window.location.hash
                                               )))
                 )
    )

  static om/IQuery
  (query [_]
         ;initial-query
         (with-meta (:query (get-query-and-params-by-parsed-url tabs (parse-url-hash
                                               js/window.location.hash
                                               ))) nil)
    )

  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)
                query (om/get-query this)
                tab-is-active (fn [tab]
                                (= unbound-query
                                   (om/query
                                     (:component tab)
                                     )
                                   )
                                )
                ]


(defmethod readf :default
  [{:keys [state] :as env} k params]
  (println "readf" k params)
  (if-let [v (get @state k)]
    {:value v}
    {:value nil}
