     [:input {:type "number"
              :field :numeric
              :max max :min min
-             :value (key @app-state)
-             :on-change #(swap! app-state assoc key (int (-> % .-target .-value)))}]])
+             :value (key @app)
+             :on-change #(swap! app assoc key (int (-> % .-target .-value)))}]])
 
 (defn needlesly-large-button []
    [:button {:on-click recommend} "Recommend"])
 
 (defn hello-world []
   [:div
-    [:h1 (:text @app-state)]
+    [:h1 (:text @app)]
     [:div
       [champion-select]]
     [champion-image]


;; define your app data so that it doesn't get over-written on reload

(defonce app-state (atom {:text "Hello world!"
                          :props #{}
                          :recommended []
                          :champ-level 18
                          :num-items 6}))

(go
  (let [champs (<! (data/champ-chan))
        items (<! (data/item-chan))]
    (swap! app-state assoc :items items :champs champs)))

(defn champion-select []
  [:label "Pick a Champion"
    [:select  {:field :list
               :on-change (fn [event]
                            (swap! app-state
                              #(assoc %1 :champ (get-in %1 [:champs %2]))
                              (keyword (-> event .-target .-value))))}
     (for [[id ch] (sort-by (comp :name val) (:champs @app-state))]
       [:option {:key id :value id} (:name ch)])]])

(defn champion-image []
  [:img {:src (data/champ-img-square-url (get-in @app-state [:champ :id] "Aatrox"))}])

(defn recommend []
  (let [{:keys [items num-items champ champ-level props]} @app-state
        ch (algo/recommend items num-items champ champ-level props)]
    (go-loop []
      (when-let [build (<! ch)]
        (swap! app-state assoc :recommended build)
        (recur)))))

(defn item-recommendation []
    [:ul (for [item (:recommended @app-state)]
           [:li {:key (:name item)} (:name item)])])

(defn objective-checkbox [name objective]
  (letfn [(toggle [event]
            (swap! app-state update-in [:props]
                   (if (-> event .-target .-checked) conj disj)
                   objective))]
  [:label



(defn on-js-reload []
  ;; optionally touch your app to force rerendering depending on
  ;; your application
  ;; (swap! app update-in [:__figwheel_counter] inc)
)

