 (ns airhead-cljs.core
   (:require-macros [cljs.core.async.macros :refer [go]])
-  (:require [reagent.core :as r]
+  (:require [reagent.core :as r :refer [atom]]
             [ajax.core :refer [GET POST PUT]]))
 
 (defn get-json [url handler params]

            :on-click post-track}]])

(defn tracks-section []
  (let [tracks (r/atom [])
        query (r/atom "")
        reset-tracks #(reset! tracks (% "items"))
        get-tracks (fn []
                     (get-json "/api/tracks" reset-tracks

  [:span (str (track "artist") " - " (track "title"))])

(defn playlist-section []
  (let [playlist (atom [])
        reset #(reset! playlist (% "items"))
        get-playlist #(get-json "/api/queue" reset {})]
    (fn []
