om

Please ask the channel first, not @dnolen directly!
2017-07-07T07:20:31.669303Z

@samcf it needs to be a root query.

2017-07-07T07:27:04.781075Z

@samcf You should be able to use (parser {:state app-state} (om/full-query (om/class->any reconciler Component)))

👍 3
2017-07-07T07:30:52.849346Z

This needs to be documented.

📄 1
the-kenny 2017-07-07T08:25:55.927037Z

(cross-posting this question in #clojurescript from yesterday): Suppose I want to build a om.next application without using IQuery (by passing all props to children explicitly, etc., just like in om.core: Can I use om/transact! for mutations safely? Initial tests tell me I can, although I get scary warnings like Invariant Violation: transact! should be called on a component that implements IQuery or has a parent that implements IQuery

wilkerlucio 2017-07-07T13:53:17.971172Z

@the-kenny that can be a bit weird, Om.next uses the queries to determine which components need re-render, that's how follow up reads work to refresh the screen, eg: (om/transact! [(some-mutation {}) :read/me], this will re-render the component that issued the query, plus any component that has :read/me on it's query, if you don't use the query then you may have to ask to re-render the entire thing all the times, which can get slow

the-kenny 2017-07-07T13:56:22.073056Z

@wcohen Yeah, I thought of that. However, the most costliest part (dom updates) shouldn't happen because shouldComponentUpdate will return false if nothing changed, right? Basically the same behavior as in om.core when you don't use cursors to update the application state.

fenton 2017-07-07T22:03:01.001273Z

@claudiu even with all remotes commented out I still get the reader function running twice. I remember reading about this somewhere but I can remember where/why.

petterik 2017-07-07T22:24:09.355894Z

@fenton are you passing an empty vector to reconciler's :remote option?

fenton 2017-07-07T22:29:54.444882Z

@petterik no. I tried just false, then I also just removed any remote references anywhere, ie remove the send parameter on the reconciled setup...

fenton 2017-07-07T23:09:23.997814Z

@petterik ok i think i understand... as @claudiu said it's once for each local and once for each remote... even if I haven't defined any remotes there is one defined by default... :remote. So by default i have one local and one remote...

👍 1