Created
December 15, 2015 22:03
-
-
Save krisajenkins/5edd2768d4a2d43fe027 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn stateful-view [] | |
(let [!form (reagent/atom {:name nil})] | |
(fn [ui-channel view-arg-1 view-arg-2] | |
[:form | |
[:input {:defaultValue (-> !form deref :name) | |
:onChange #(swap! !form assoc :name (.. % target value))}]]))) | |
(defn regular-view | |
[ui-channel app] | |
[:div | |
... | |
(with-meta [stateful-view ui-channel arg1 arg2] | |
{:key :somethingsensible})]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment