(ns leipzig-live.views
  (:require
    [leipzig-live.actions :as action]))

(defn home-page [handle! state]
  [:div [:h1 "Welcome to Leipzig Live!"]
   [:div [:input {:type "text"
                  :value (:text state)
                  :on-change #(-> % .-target .-value action/->Refresh handle!)}]
   [:button {:on-click (fn [_] (handle! (action/->Play)))} "Play!"]]
   [:div
    (-> state :music print)]])

(ns leipzig-live.views
  (:require
    [leipzig-live.actions :as action]))

(defn home-page [handle! state]
  [:div [:h1 "Welcome to Leipzig Live!"]
   [:div [:input {:type "text"
                  :value (:text state)
                  :on-change #(-> % .-target .-value action/->Refresh handle!)}]
   [:button {:on-click (fn [_] (handle! (action/->Play)))} "Play!"]]
   [:div
    (-> state :music print-str)]])

Fix the printing of the result.
Fix the printing of the result.

ctford/leipzig-live,ctford/cljs-bach,ctford/cljs-bach