This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-24
Channels
- # arachne (1)
- # aws (1)
- # beginners (43)
- # boot (67)
- # cider (7)
- # cljs-dev (14)
- # cljsjs (6)
- # clojure (215)
- # clojure-czech (2)
- # clojure-dev (12)
- # clojure-dusseldorf (2)
- # clojure-italy (1)
- # clojure-russia (22)
- # clojure-spec (2)
- # clojure-uk (33)
- # clojurescript (85)
- # cryogen (2)
- # cursive (1)
- # datascript (22)
- # datomic (18)
- # dirac (8)
- # hoplon (9)
- # klipse (1)
- # lein-figwheel (5)
- # leiningen (126)
- # off-topic (1)
- # om (57)
- # onyx (159)
- # pedestal (33)
- # planck (2)
- # re-frame (52)
- # reagent (3)
- # ring (2)
- # ring-swagger (16)
- # test-check (12)
- # testing (5)
- # untangled (86)
- # vim (6)
@anmonteiro nice! what strategy did you end up taking for issue #7? (reconciler option)
@levitanong: ended up assoc
ing, one of your suggestions. It became possible because of some other design decisions
@anmonteiro Awesome! Glad it turned out well.
@anmonteiro I think I found a solution. Instead of modifying the ast to get the union select (almost) working, I made it possible to supply a query override to the recurse-remote function supplying the query of only the selected part of the union. It seems to work, but I need to do some cleanup and testing before I know for sure. Thanks for leading me in the right direction!
Sorry if it’s a stupid question, but… it’s a good practice reference a dom element y the will-mount
section?
@rackdon AFAIK, you should be referencing a dom element in did-mount
. You will probably not get anything in will-mount
and what happen if I need the element in the will-mount
? should I put it in the state?
why do you specifically need it in will-mount
?
is there any reason why you can’t just migrate all the code to did-mount
?
I have to put all the functions in the will-mount, but one of the arguments it’s the element where I’ll print the values...
@rackdon but why not put those functions in did-mount?
most of the time, any code you’d put in will-mount is perfectly valid in did-mount
yeah, go loops can be in did-mount also, as far as I know. Just don’t put them in render
😛
hi, I’m getting "next.cljc:1964 Uncaught #error {:message "No queries exist for component path <path> :data {:type :om.next/no-queries}}”}
. I don’t really understand what that means, or how to fix it
Are there any docs on what exactly can go in a query, and what the constraints are? I feel like that would help me use om next much more effectively
@anmonteiro I’m experiencing something strange with om.next + clojurescript 1.9.293.
om.next + clojurescript 1.9.229:
If I place a println inside a (query [this] …)
, it properly outputs to console.
om.next + clojurescript 1.9.293:
neither println nor console.log outputs to console in things related to queries. (parser, send, etc…) But print functions inside render work properly.
Not seeing this behavior here with cljs 1.9.293 though I’m running om snapshot at the moment
Something I've never attempted, is it possible to do multiple :send calls so I can have different remotes using different http headers and uri-s?
I see printing to console that the :send callback is all gathered to one. Can't see quickly how to tell which :remote to use which http call.
@anmonteiro Should om normalization work with :route-dispatch false? I didn’t see a test for it, and I wasn’t sure how that was intended
Yeah, I can’t figure it out. If I feed my init-data as :state to the reconciler, it normalizes
Why can’t you reuse queries? (assert (nil? c) (str "Query violation, " x , " reuses " c " query”))
apparently you should only set-query if it changes, but I’m more asking why it’s bad. Largely because I don’t understand how omnext works
When om gets the query from your component, it adds metadata to it so it knows which component it came from
I’m not very familiar with the om next internals, but it has to do something there to go from query to the component’s ident
I think it also uses that metadata to quickly find updated components when data changes
(I assume you’re trying to set your root component’s query to a “page” component’s query? compassus is trying to solve that problem)
@jonsmock sorry I don’t understand your question. Happy to look at a minimal repro though to help you figure out what’s wrong!
(might have to wait a few days though, since I’m at euroclojure)
@anmonteiro: Awesome, have fun! Yup, I'll put something together.
from the components, identity, normalization tutorial: [{:list/one ~subquery}]
What does a map inside a query do?
all of this https://anmonteiro.com/2016/01/om-next-query-syntax/ should be a part of the official docs