Would it be possible to pass-in some kind of "DataScriptCursor" into a component? Like this:
(defn app-view []
(reify
om/IRender
(render [_]
(let [count (query q-count)] ; count is a 'DataScriptCursor'
(dom/div nil
(dom/h2 nil "Hello World")
(om/build #(app-counter count) {})))))) ; app-counter receives a 'DataScriptCursor'
Then maybe the manual binding could be removed:
om/IWillMount
(will-mount [_]
(od/project-onto conn app app-projections))
om/IWillUnmount
(will-unmount [_]
(od/unproject-from conn app app-projections))
What do you think?
Would it be possible to pass-in some kind of "DataScriptCursor" into a component? Like this:
Then maybe the manual binding could be removed:
What do you think?