 
 (def jedi-url "http://localhost:3000/dark-jedis/")
 
-(defonce app-state (atom {:planet {:id nil :name "unknown"}
-                          :jedis []
-                          :first-jedi-id 3616}))
+(defonce app-state (reagent/atom {:planet {:id nil :name "unknown"}
+                                  :jedis []
+                                  :first-jedi-id 3616}))
+
+(def current-planet (reaction (:planet @app-state)))
+(def jedis (reaction (:jedis @app-state)))
 
 (defn pad
   "Pads the collection coll to the given length n with val"


(defn planet-monitor [planet]
  [:h1 {:class "css-planet-monitor"}
   (str "Obi-Wan currently on " (:name planet))])

(defn jedi-slot [jedi]
  [:li {:class "css-slot"}

(ns ^:figwheel-always flux-challenge-re-frame.core
  (:require
    [clojure.walk :refer [keywordize-keys]]
    [reagent.core :as reagent]
    [chord.client :refer [ws-ch]]
    [cljs.core.async :refer [<!]]
    [cljs-http.client :as http])
  (:require-macros
    [cljs.core.async.macros :refer [go]]
    [reagent.ratom :refer [reaction]]))

(enable-console-print!)

