om

Please ask the channel first, not @dnolen directly!
rgm 2017-05-18T02:59:29.065620Z

so I'm slowly slowly figuring out om.next architectural patterns in anger. Would it be fair to call complex (let [...]) manipulations within my components a code smell, and that these will somehow get rolled up into the reconciler's read functions?

rgm 2017-05-18T02:59:37.066587Z

eg.:

rgm 2017-05-18T03:00:38.074944Z

let's say I have a list component showing a subset of some big items/by-id table

rgm 2017-05-18T03:01:23.080602Z

the subset might have repeats, eg. [[items/by-id 1] [items/by-id 1] ...]

rgm 2017-05-18T03:02:25.087804Z

(I'm modelling something where there might be different quantities of the same item; it models uses of a building detail and they may be in different locations but still part of the "bag" of details).

rgm 2017-05-18T03:03:18.093909Z

and let's say I'd like to just have a unique-ified list available in the same component as a summary.

rgm 2017-05-18T03:04:10.100070Z

I can do this at the component in a let based on the props, but I have this feeling that this is supposed to be shoved into the reconciler/read function.

rgm 2017-05-18T03:06:10.113777Z

and let's assume I'm not totally off base on that: I'm having trouble finding good examples of how that sort of read function might get written, where I stuff derived properties into the {:value {:whatever}} ... I guess maybe as a final transform on what came back from the app state read?

rgm 2017-05-18T03:06:48.118285Z

eg. {:value (my-transform-to-add-derived-values {:values :from :query-driven :state :read})}?

tony.kay 2017-05-18T03:43:22.360204Z

Has anyone else noticed a problem with using a root-level property keyword in a follow-on read not triggering a root re-render?

tony.kay 2017-05-18T03:43:47.362883Z

seems to work when I use a kw from a root-level join

currentoor 2017-05-18T11:36:57.568798Z

@tony.kay is the data being queried for changed by the mutation?

tony.kay 2017-05-18T16:42:00.148284Z

@currentoor Ah, right. I bet that is it.

currentoor 2017-05-18T16:42:25.157399Z

@tony.kay that was the issue for me recently 😄

tony.kay 2017-05-18T16:43:14.175697Z

I just spaced that the re-query gets focused by the follow-on read…I was assuming the whole query was going to run.

tony.kay 2017-05-18T16:43:50.188240Z

I was just thinking of the index lookup part 🤦