   []
   (let [id-store        (local-storage (atom nil) ::id-store)
         selected-tab-id (reagent/atom (if (nil? @id-store) (:id (first tabs-definition)) @id-store))   ;; id of the selected tab
-        _               (add-watch selected-tab-id nil #(reset! id-store %4))]                         ;; remember the current navigation item being viewed.
+        on-select-tab   #(do (reset! selected-tab-id %1) (reset! id-store %1))]
     (fn ;; _main
       []
       [h-box



(defn left-side-nav-bar
  [selected-tab-id]
    [v-box
     :children (for [tab tabs-definition]
                 [nav-item tab selected-tab-id])])


(defn re-com-title

                   :h-scroll :off
                   :child [v-box
                           :children [[re-com-title]
                                      [left-side-nav-bar selected-tab-id on-select-tab]]]]
                  [scroller
                   :child [box
                           :size      "auto"
