Fork me on GitHub
#om
<
2016-04-29
>
tomjack00:04:30

I dunno. the reconciler docstring for :send says "The callback should take ... the query that was sent as the second argument"

fifigyuri07:04:44

tomjack: thank you, I try these hints out, I also think that referring to components from parsers/remote handling logic would be weird, but it also stands for a try

fifigyuri09:04:03

@anmonteiro is having a talk about om next on craft conf right now https://craft-conf.com/2016

fifigyuri09:04:39

it’s free online

hkjels09:04:58

There seems to be some sort of leak going on in Safari with om.next specifically. I haven’t figured out what exactly that causes it yet. Are there known problems with Safari?

jimmy09:04:48

@fifigyuri: when will we have the talk online ? I would love to watch it

fifigyuri09:04:50

it’s right now, showing demos, but it’s should come online, after the conference, the talks for last year are available, so this year should be too

jimmy09:04:30

nice, thanks

jimmy09:04:28

wow, there are some great speakers there too

iwankaramazow16:04:50

just missed anmonteiro's talk this morning 🙃

iwankaramazow16:04:29

Hopefully they'll post it asap on youtube

tomconroy16:04:29

hey all, i'm confused about how to introduce novelty from a remote. my app state is a list of items {:items/list [{:id 1, ...}]} and get normalized with [:item/by-id id]. i have a mutate function 'items/insert which simply returns :remote true. so, this works fine if i call (om/transact! this '[(items/insert {:title "foo"}) :items/list]) – the server parses and responds with the entire :items/list, and the frontend updates. what i'm confused about is: how do i set this up so the server only returns the new item, and the frontend merges that single item into :items/list?

tomconroy17:04:34

in other words, in the remote, what should the :action function in ’items/insert return? and do i need to transform the response from (parser nil (req :body)) ?

dimiter17:04:39

If I have nested OM components (Next), Can I have queries for Subcomponents for keys not included in the parent component?

dimiter19:04:34

Basically, I am looking to have a Root “Widget” that has multiple subcomponents like navigation-bar, notification-bar. etc… But I want those to pull down their own state from the root reconciler. Or do I have to query the state at the Root component level and pass it down.

tomconroy19:04:46

@dimiter: the root needs to compose every subquery

tomconroy19:04:35

you can use (om/get-query NotificationBar)

dimiter19:04:00

Right, I saw that in one of the tutorials..

dimiter19:04:26

Just a touch concerned if I have too many remote reads on sub-components, will they trigger re-render at the root level?

tomconroy19:04:49

hmm, i think so, but i think om implements shouldComponentUpdate so it should be performant still

tomconroy19:04:01

(i’m not certain about this)

dimiter19:04:51

I will play around with it. I tried using shouldComponentUpdate at the root level and setting it to false, however that also prevents the sub-components from updating their props.

dimiter22:04:38

What does this mean?

next.cljs:1229 Uncaught #error {:message "No queries exist for component path (torcaui.components.app/App torcaui.components.landing/AutoCompleter)", :data {:type :om.next/no-queries}}

dimiter22:04:54

I am trying to create a nested component and update its search params.

dimiter23:04:39

Figured it out, Root component has to dynamically pull in the child’s query. This helped: