This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-28
Channels
Hey guys, how do i set the title
field in this atom as value of input?
(def state (r/atom {:items {}
:input {:title ""
:link ""}}))
(defn title-input [name id class placeholder]
(let []
[:input.input_field {:type "text" :value (:title (@state :input))
...
:on-change #(reset! state update-in [:input :title] (-> % .-target .-value))
}]))
:value (:title (@state :input))
gives me an error i can’t understand:
core.cljs:3485 Uncaught TypeError: Cannot read property 'cljs$lang$maxFixedArity' of undefined
==== EDIT
seems like i should use reagent’s cursors here