@samcf it needs to be a root query.
@samcf You should be able to use (parser {:state app-state} (om/full-query (om/class->any reconciler Component)))
This needs to be documented.
(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
@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
@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.
@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.
@fenton are you passing an empty vector to reconciler's :remote
option?
@petterik no. I tried just false, then I also just removed any remote references anywhere, ie remove the send parameter on the reconciled setup...