Fork me on GitHub
#re-frame
<
2015-10-09
>
quantisan06:10:53

@pupeno: bind-fields has a callback fn arg where you can sink your local binded atom back to app-db

[bind-fields inputs-form-template inputs-form-cache
                   (fn [_ _ doc]
                     (dispatch [:inputs-form-update [doc (:id @current) (:date @current)]]))]

quantisan06:10:50

where inputs-form-template is a def form and inputs-form-cache is a local ratom (let [inputs-form-cache (reagent/atom {})] ... [bind-fields ...] ...)

quantisan06:10:14

copy and pasted from my production code so there are extra stuff