   (ef/at "#specializations-completed"
          (ef/content (map specialization-comleted data))))
 
+(defn data-changed? [data data-part]
+  (if (= {} @user-data) true
+      (not= (data-part data) (data-part @user-data))))
+
+(defn render-if-changed [render-function data data-part]
+  (if (data-changed? data data-part) (render-function (data-part data))))
+
 (defn render-whole-user-data [data]
-  (recommendation-list (:recommendations data))
-  (recommendation-completed-list (:recommendations-completed data))
-  (specialization-available-list (:specializations-available data))
-  (specialization-completed-list (:specializations-completed data)))
+  (render-if-changed recommendation-list data :recommendations)
+  (render-if-changed recommendation-completed-list data :recommendations-completed)
+  (render-if-changed specialization-available-list data :specializations-available)
+  (render-if-changed specialization-completed-list data :specializations-completed)
+  (reset! user-data data))
 
 (defn try-load-recommendations
   ([]

(em/defaction observe-change-user []
  ["#users-id"]
  (events/listen :change
                 #((do (reset! user {:username (ef/from "#users-id" (get-prop :value))})
                       #_(js/alert (str "Before try load recommendations for user: " @user))
                       (refresh)

                       #_(js/alert (str "User changed. Current user: " @user))))))

(defn start []
  (ef/at ".container"



(def user (atom {:username "user2"}))
(def user-data (atom {}))

(def tmpl "/html/kmg.html")

