Open stephanos opened 9 years ago
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?
Yes, I think this would be possible and considered it in my first pass. Now that I have it working it could make for some handy convenience code.
I would love to see that :+1: :)
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?