diff --git a/dev.cljs.edn b/dev.cljs.edn index 9638c14..6752acd 100644 --- a/dev.cljs.edn +++ b/dev.cljs.edn @@ -1,5 +1,6 @@ {:main cljs-spa.core :npm-deps false ;; this is important! + :language-out :ecmascript5 ;; see https://dev.clojure.org/jira/browse/CLJS-2376 :output-to "target/public/compiled/app.js" :foreign-libs [{:file "./doublebundle/dist/doublebundle.js", :provides ["react" "react-dom" "create-react-class" "react-dom/server" diff --git a/src/cljs_spa/page/home.cljs b/src/cljs_spa/page/home.cljs index 3dc7aa0..566e19b 100644 --- a/src/cljs_spa/page/home.cljs +++ b/src/cljs_spa/page/home.cljs @@ -1,6 +1,8 @@ (ns cljs-spa.page.home - (:require [react-select :as react-select] - [cljs-spa.state :refer [!state]])) + (:require + ;; See https://github.com/pesterhazy/cljs-spa-example/issues/13 + [react-select :refer [default] :rename {default react-select}] + [cljs-spa.state :refer [!state]])) (def options [{:value "simplicity" :label "simplicity"} @@ -8,7 +10,7 @@ {:value "lazy sequences" :label "lazy sequences"}]) (defn selector-ui [] - [:> (.-default react-select) + [:> react-select {:is-multi true :options (clj->js options) :on-change (fn [xs] (swap! !state assoc :selection