                 :placeholder "Enter text to reverse!"
                 :on-change   #(reset! val (-> % .-target .-value))}]
        [:button {:type     "button"
-                 :on-click oonclick}
-        "Open"]
-       [:button {:type     "button"
                  :on-click (partial sonclick @val)}
         "Send"]
        [:button {:type "button" :on-click conclick} "Close"]

   [:div
    [:h1 "WebSocket Demo"]
    [demo]]
   (.getElementById js/document "root")))


(def socket (atom nil))

(defn connect []
  (let [uri       (str "ws://" (.-host js/location) "/ws")
        websocket (js/WebSocket. uri)]
    (set! (.-onerror websocket) onerror)
