Unable to edit fields after bind-fields
jiangts opened this issue · comments
I'm using re-frame and have the following dependencies:
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-3211"]
[reagent "0.5.0"]
[re-frame "0.4.1"]
[secretary "1.2.3"]
[cljs-ajax "0.3.14"]
[garden "1.2.5"]
[reagent-forms "0.5.5"]
[reagent-utils "0.1.5"]
[json-html "0.2.8"]]
I tried multiple things, and eventually even just copied the code at https://github.com/reagent-project/reagent-forms/blob/master/forms-example/src-cljs/forms_example/core.cljs. Still, it doesn't work.
Do you have any tips?
Thanks
I have no experience using re-frame unfortunately, so I'm really not sure what might be happening there.
I was also having the same problem and it was because I was referencing a regular atom rather than an ratom.
(defn page []
(let [doc (atom {:person {:first-name "John"
...
Should be
(defn page []
(let [doc (reagent.core/atom {:person {:first-name "John"
...
Ah yeah, that's the most likely problem, I just assume it was something re-frame specific.
Ah, of course! I missed the reagent.core :refer [atom] in the ns form.
Works now, thanks