This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-09
Channels
- # beginners (41)
- # boot (4)
- # cider (36)
- # cljsrn (9)
- # clojure (365)
- # clojure-dev (1)
- # clojure-dusseldorf (1)
- # clojure-nl (1)
- # clojure-russia (3)
- # clojure-spain (1)
- # clojure-spec (19)
- # clojure-uk (1)
- # clojurescript (159)
- # code-reviews (7)
- # core-async (51)
- # cursive (2)
- # datascript (1)
- # datomic (1)
- # emacs (5)
- # figwheel (3)
- # hoplon (18)
- # incanter (1)
- # lein-figwheel (1)
- # leiningen (3)
- # lumo (145)
- # off-topic (26)
- # onyx (21)
- # re-frame (2)
- # reagent (45)
- # rum (4)
- # uncomplicate (10)
- # untangled (23)
- # yada (6)
Please give an answer of the “untangled-devguide.E-UI-Queries-and-State-Exercises”. ( With the graph-db already set,how will you chain the total-query with an intermediate ui-component without the query-expression.)
@eric.shao: Would using get-query
help? (sorry haven't looked at the exercises) - that's how you use the query of another component.
@cjmurphy thank you for rpl. yes, I want to use ’get-query to chain them throuth.but … (components structure: Root->PeopleWidget->Person)(db-structure: db-map -> :widget ->:people ->person) (query-structure: Root -> Person)
@eric.shao I think on that one there is a component that has no state…and as far as “stateless” components go, you just don’t involve them in the query, and they can pass props through unchanged. In other words, they’re sort of invisible. You’d compose the query of the child up to the stateful parent. It isn’t the best example, and I should update the exercises. It is really rare that a component would be involved like that and have zero state.
hm..that may not be right. It’s been a long time since I wrote that exercise. I’d have to pull the source and do it…and at that point I should probably just rewrite it
Not a bad idea to use the youtube videos. They are a bit more up to date. They are short segments (like 20 mins each) and most ppl find them quite useful.
[:new-person :last-error {:widget [{:people (om/get-query Person)}]}] two-levels-join donesn’t work,right?
[:new-person :last-error {:people (om/get-query Person)}]
- just one vector on the outside. See the Kanban demo for all of this kind of Om.Next stuff put together.
https://github.com/Jannis/om-next-kanban-demo - is very good for just reading code for a real application, that includes CSS etc. <<- @eric.shao
The two (or more) levels join happens by composition, so [:new-person :last-error {:widget (om/get-query Widget)}]
. And then the Widget component might have the query [{:people (om/get-query Person)}]