 
 (defui Widget
   Object
+  (componentDidMount [this]
+    ;; connect WS
+    (let [ws (WebSocket.)]
+      (.open ws "ws://:8991")
+      ;; register event handler
+      (.listenOnce ws (.. WebSocket -Event -OPENED) #(om/set-state! this {:ws ws}))
+      ;; register event handler TODO
+      (.listen ws (.. WebSocket -Event -MESSAGE #()))))
+
   (render [this]
+    (let [ws])
     (dom/div nil
       (repolist-factory)
       (dom/input #js {:id "url-input" :type "text"})

        post-url "/app/user/repos"]
    (go (let [resp (<! (http/post post-url {:json-params {:url url}}))]
          （prn resp))))

(defui RepoList
  Object

            [om.dom :as dom :include-macros true]
            [om.next :as om :refer-macros [defui]]
            [goog.dom :as gdom]
            [goog.json :as json]
            [cljs-http.client :as http])
  (:import [goog.net WebSocket]))

(enable-console-print!)

