@alex-glv I'm not convinced that stuff should be built in, people will have different routing requirements and the primitives are already there to support them. I think this is better served by other libs, such as compassus.
However, I would really like the existing primitives (such as set-query!) to properly support datascript and other stores.
I think to do that, the store should define a concrete interface. Perhaps it can already be done by implementing some abstractions that atoms are built on? I would be happy to work on a PR for this, with some guidance on how it would be accepted (@dnolen @anmonteiro).
has anyone tried om.next with cljsjs/react-motion?
@denik yes, works great, let me forward you my shimmy
@denik: First, add this dependency [cljsjs/react-motion "0.4.1-1"]
Then you just need the following code:
(defn motion [atts thunk]
(js/React.createElement js/ReactMotion.Motion (clj->js atts)
(fn [value]
(thunk (js->clj value :keywordize-keys true)))))
(def spring js/ReactMotion.spring)
(def wobbly js/ReactMotion.presets.wobbly)
(def gentle js/ReactMotion.presets.gentle)
(def stiff js/ReactMotion.presets.stiff)
@denik then you do something like:
(mo/motion {:defaultStyle {:left (if (:from-right (om/get-state this))
-100
100)}
:style {:left (mo/spring (:basic-info-left (om/get-state this)))}}
(fn [value]
...))
Where value will have the animation valuewow thanks @drcode!
@danielstockton I think the DataScript issue can be solved by putting & looking for queries in a place other than the app-state
we just need to find a suitable place to put them in