This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-22
Channels
- # adventofcode (1)
- # beginners (172)
- # boot (47)
- # cider (7)
- # cljs-dev (30)
- # cljsrn (43)
- # clojure (180)
- # clojure-dusseldorf (1)
- # clojure-greece (1)
- # clojure-italy (3)
- # clojure-russia (41)
- # clojure-spec (67)
- # clojure-uk (101)
- # clojurescript (128)
- # core-async (4)
- # cursive (13)
- # datomic (29)
- # devcards (5)
- # emacs (19)
- # events (1)
- # hoplon (38)
- # lein-figwheel (1)
- # luminus (8)
- # midje (1)
- # off-topic (47)
- # om (10)
- # onyx (23)
- # protorepl (1)
- # re-frame (11)
- # reagent (7)
- # ring (3)
- # ring-swagger (9)
- # rum (6)
- # sql (5)
- # untangled (4)
@ag For me personally, if I know a component will be used to display info about multiple things, I wouldn’t make a query. It may be used by something that has a query though, if it’s a component that represents an entity in your data.
@levitanong this is still somewhat a trivial example, but check this out https://github.com/untangled-web/untangled-components/blob/master/src/main/untangled/components/ui/component/table.cljs#L167 it uses a query
@ag hmm. I wonder what the ui tree looks like now.
@peeja It was the root component query, although it might not be at the root of the query going into the parser because of compassus.
@anmonteiro After a lot of fiddling, i seem to have something that is working as i would like it (routing). Instead of creating my own set-route!
function that also uses pushy/set-token!
, I only use compassus/set-route!
and in componentWillUpdate
of my wrapper component I do pushy/set-token!
if current route doesnt match the token.
In my merge function, I don't call compassus/set-route!
but instead return :compassus.core/route
from the server which gets merged like any other key....this way I avoid needing the setTimeout hack to set-route after the token has been merged, they are merged at the same time.
Actually, it's still not working with :compassus.core/route coming from the server, it doesn't trigger a re-read of the root query unless i call set-route!
and still can't call set-route! in merge without setTimeout hacks
wrote a post about the time-travel feature in Om next and datomic, if anyone is interested: https://medium.com/adstage-engineering/contextual-debugging-with-om-next-and-untangled-8c168900dba5
wrote a post how we use the time-travel feature in Om next and untangled, if anyone is interested: https://medium.com/adstage-engineering/contextual-debugging-with-om-next-and-untangled-8c168900dba5