This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-22
Channels
- # arachne (8)
- # bangalore-clj (1)
- # beginners (72)
- # boot (95)
- # braveandtrue (5)
- # business (1)
- # capetown (1)
- # cider (180)
- # cljs-dev (8)
- # cljsrn (20)
- # clojure (104)
- # clojure-art (1)
- # clojure-brasil (8)
- # clojure-czech (1)
- # clojure-greece (15)
- # clojure-korea (13)
- # clojure-poland (2)
- # clojure-russia (53)
- # clojure-sg (5)
- # clojure-spec (60)
- # clojure-uk (35)
- # clojurescript (186)
- # community-development (3)
- # core-async (24)
- # cursive (18)
- # datascript (11)
- # datomic (39)
- # devcards (4)
- # emacs (2)
- # events (1)
- # funcool (23)
- # hoplon (148)
- # juxt (1)
- # ldnclj (2)
- # luminus (1)
- # off-topic (22)
- # om (27)
- # onyx (35)
- # overtone (2)
- # pedestal (7)
- # perun (8)
- # protorepl (2)
- # rdf (6)
- # re-frame (15)
- # reagent (2)
- # ring-swagger (10)
- # untangled (54)
Never mind 馃檪 https://github.com/omcljs/om/wiki/Om-Next-FAQ#what-does-value-keys--do-from-a-mutation-result-map
If I have a component (sidebar) which should set-query on another component (main view) in order to change filters, how should i pass the main component to the sidebar component?
The sidebar component is actually a child component of the main view, I don't know if I can access the parent component somehow?
@danielstockton pass it as a computed property
(sidebar (om/computed sidebar-props {:owner this}))
Ok, thought about doing that but wasn't sure if it was a good idea or not, thanks
It's actually a queryless component, does that mean I can just pass it as props?
I also have some code I'm worried about in my send function, I'm using the current compassus route to find the component for that route, and using that component with om/tree->db to normalize what I get back from a remote call. Does this sound very wrong?
I tried getting the component from the query ast, but it seems to be a child component there that only has a query fragment and to use tree->db i need the root query
@danielstockton hrm, if you pass the query to normalize against in the send callback, Om will normalize it automatically for you
provided you have :normalize true
in the reconciler
oh, i didn't see that took a second argument
wow, worked, thanks
quite a big trick i was missing
`[({:items ~subquery} {:test ?test})]))
I have a parameterized query like this and I can't work out how to quote it, so that the ?test is replaced and I don't just send the symbolah, reason being that it shouldn't qualify the namespace right?
just want a plain symbol matching the key in IQueryParams
thanks
Anyone have a pointer to a small project with Om.next and some server side stuff (maybe even not a Datomic db but a backing sql db) ?
what's the om.next way to set a component's initial state?
set-state! in willmount?
@anmonteiro: When using compassus, which component can I use as my root component, when using merge!
or tree->db
? I tried (compassus/root-class app)
, but that does not seem to have a query attached to it
@tobiash I started by using the routes
to deduce the root component from the current root. Then i discovered that the send callback takes an optional second argument (a query) and om can do this for you with the default merge.