               [reagent-forms.core :refer [bind-fields]]
               [ajax.core :refer [GET json-response-format]]
               [clojure.string :as string]))
+
+(def app-state (atom {}))
+(def cities (reagent/cursor app-state [:cities]))
+(def city-id (reagent/cursor app-state [:city :id]))
 
 ;; -------------------------
 ;; Views

    (let [country (first (filter #(= (:cca2 %) country-id) countries))]
      [:p "Selected country is " (country-name country)])))

(defn home-page []
  [:div [:h2 "Welcome to weather-demo"]
   [:div "You might want to check out the " [:a {:href "/weather"} "weather"]]])

    (fn []
      [:div [:h2 "Weather page"]
       [country-field @countries selected-country]
       [load-city-field (:id @selected-country)]
       [country-description @countries (:id @selected-country)]])))

(defn current-page []
