Fork me on GitHub
#fulcro
<
2020-01-14
>
tony.kay06:01:03

mostly I suspect they either work, or semantic-ui-react is having problems

tony.kay06:01:23

I don’t use the sui wrappers for forms, since they are just adding simple classes to simple dom elements.

otwieracz09:01:57

I am making my way through Fulcro book while writing my little app. I'm at the point of loading data from remote: http://book.fulcrologic.com/#_parsing_queries

otwieracz09:01:24

I have multiple components nested one on top of another, so doing things way shown here requires a lot of code duplication.

otwieracz09:01:48

As I have A, which consists of list o B and each B consists of list of A.

otwieracz09:01:32

So in A resolver, I will have to assoc each B from id into data, and for each of those B's I'd also have to expand A according to id inside of it.

otwieracz10:01:57

Isn't this possible to, taking documentation as an example, use person-resolver to resolve each person in list-resolver?

Björn Ebbinghaus11:01:59

I am not sure if I understand your problem.. Is this a fulcro or a pathom question? Anyway. I think this is what you are looking for?

(defresolver list-resolver [_ _]
   {::pc/output [{:all-persons [:person/id]}
   {:all-persons [{:person/id 1} {:person/id 2} {:person/id 3}]})

(defresolver person-resolver [_ {id :person/id}]
  {::pc/input #{:person/id}
   ::pc/output [:person/name :person/age]}
  (person-by-id id)) ; #:person{:name "foo" :age 42}