   [clicks]
   [:h2 "Clicks: " [:small @clicks]])
 
-(defn circle-component [cx cy r fill score]
-  [:circle {:cx @cx :cy @cy
-            :r @r :style {:fill @fill}
-            :onClick (fn [e] (swap! score inc))}])
+(defn circle-component
+  [cx cy r fill score]
+  (let [local-state {:x cx :y cy}]
+    (r/set-state (r/current-component) local-state)
+    (fn [cx cy r fill score]
+      [:circle {:cx @cx :cy @cy
+                :r @r :style {:fill @fill}
+                :onClick (fn [e] (swap! score inc))}])))
 
 (defn make-constraint
   "Creates a function that keeps a supplied number within the set bounds"

  (fn [num]
    (let [local-max (if (<= num maximum) num maximum)]
      (if (<= minimum local-max) local-max minimum))))

(def draggable-circle-component
  (with-meta circle-component

(ns svg.app
  (:require-macros [reagent.debug :refer [log prn]])
  (:require [reagent.core :as r :refer [atom]]
            [goog.string :as gstring]
            [goog.string.format]
