Skip to content

Instantly share code, notes, and snippets.

@cassiomarques
Created September 21, 2015 22:56
Show Gist options
  • Save cassiomarques/2c31a2341d4a017c2a90 to your computer and use it in GitHub Desktop.
Save cassiomarques/2c31a2341d4a017c2a90 to your computer and use it in GitHub Desktop.
(defn bind-input [input-atom]
#(reset! input-atom (-> %1 .-target .-value)))
(defn some-component []
(let [value-atom (r/atom nil)
[:input {:type "text" :on-change (bind-input value-atom)}]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment