This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-31
Channels
- # architecture (5)
- # beginners (35)
- # boot (150)
- # cider (1)
- # clara (7)
- # cljs-dev (131)
- # cljsrn (10)
- # clojure (76)
- # clojure-austin (3)
- # clojure-berlin (1)
- # clojure-brasil (1)
- # clojure-chicago (2)
- # clojure-dusseldorf (1)
- # clojure-italy (30)
- # clojure-nl (2)
- # clojure-russia (40)
- # clojure-serbia (2)
- # clojure-spec (25)
- # clojure-uk (13)
- # clojured (2)
- # clojurescript (106)
- # core-async (29)
- # datascript (65)
- # datomic (38)
- # emacs (8)
- # funcool (8)
- # hoplon (6)
- # jobs (3)
- # klipse (93)
- # luminus (16)
- # lumo (4)
- # off-topic (2)
- # om (11)
- # onyx (13)
- # pedestal (4)
- # protorepl (3)
- # re-frame (40)
- # reagent (31)
- # ring (6)
- # ring-swagger (4)
- # slack-help (5)
- # spacemacs (13)
- # untangled (17)
- # vim (2)
@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).
@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 value@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