This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-16
Channels
- # bangalore-clj (8)
- # beginners (78)
- # boot (68)
- # cljs-dev (32)
- # cljsrn (43)
- # clojars (2)
- # clojure (147)
- # clojure-italy (4)
- # clojure-nl (2)
- # clojure-quebec (1)
- # clojure-russia (19)
- # clojure-spec (17)
- # clojure-uk (25)
- # clojurescript (98)
- # clr (2)
- # core-async (14)
- # cursive (5)
- # datascript (1)
- # datomic (23)
- # emacs (4)
- # hoplon (8)
- # jobs (4)
- # kekkonen (1)
- # lein-figwheel (9)
- # off-topic (2)
- # om (2)
- # om-next (9)
- # onyx (4)
- # planck (2)
- # re-frame (14)
- # ring-swagger (3)
- # untangled (18)
If I remember right, the "type" has to be the first element of the ident, not the second
Think of the to-many union case: you might have a list of idents like this: [ [:image 1] [:comment 2] [:link 3] ]
to render out a list of things (an image, comment, and link). The union query would be {:image (om/get-query Image) :comment ...}
The first element of the ident is used to select the subquery to use for the element being found in the app db
It sucks a little for singletons, cause you'd like to say [:tab :main]
, but you have to instead say [:main :tab]
might also help to remember that the second element of a thing is the ID, and there is only one of those for singletons...what if it were a number (which it can be): [:main 0]
, [:main :only-one]
, etc.
Maybe a dumb question — is Om unusable/not worth it without a Clojure/Datomic/EDN backend?
Clojure and Datomic aren’t technically possible backend options in our case with my team’s project.
EDN might be if we can get our backend parser to support it.