In the local-state example in the om-cookbook, I'm able to update the counter using update-state! and set-state!, but not with transact!
I initialized project using chestnut template.
(def app-state (atom {:button-presses 0}))
These work
(defn clicks [data owner]
(om/update-state! owner [:button-presses] inc))
(defn clicks [data owner]
(let [value (om/get-state owner :button-presses)]
(om/set-state! owner :button-presses (inc value))))
This doesn't work
(defn clicks [data owner]
(om/transact! data :button-presses inc))
Call from IRenderState
om/IRenderState
(render-state [_ state]
(dom/div nil
(dom/button #js
{:onClick #(clicks data owner)}
"Click Moi")
(dom/br nil)
(dom/p nil
(str "Button Presses: " (:button-presses state)))))))