Skip to content

Instantly share code, notes, and snippets.

@jlongster
Last active January 7, 2016 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlongster/5120b6b1160866affc12 to your computer and use it in GitHub Desktop.
Save jlongster/5120b6b1160866affc12 to your computer and use it in GitHub Desktop.
(defn read [{:keys [state ast]} key params]
(println "called")
{:value (get @state key :not-found)})
((om/parser {:read read}) {:state (atom {})} '[:foo])
;; output:
;; called
(def reconciler
(om/reconciler
{:state {:transactions []}
:parser (om/parser {:read read})}))
(om/transact! reconciler '[:foo])
;; output:
;; called
;; called
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment