Fork me on GitHub

@sova remember an html page is a tree, with the root being an <html> tag, so this shouldn't seem too foreign.


@fenton thanks man, I guess my question is, do you have a single Om.root call in your program? And, if that is the case, then I have a "root component" with (defui ...) and all my other components are called from within that? I'm just wondering about how om works best ... with one single .js object mounted on <div id="app"></div>?


Hey, forget what I said! I didn't see the other messages in the channel xD


@danielstockton do you think you could link to an example where the queries of the (sub)components are deferred via (om/get-query ComponentClass) ?


@sova check the quick start wiki...I often go back to the identity one or thinking in links...I think there are examples there


@fenton Yo I just understood what you said, it took me a minute to grok the parallel between html hierarchy and the component nesting. Finally getting something nested to render makes me a happy newdev (om/factory makes it invokable just as its own name ... caveat i did not really get until now)


@sova everything UI is a tree/hierarchy. However sometimes you'll have the same data at different spots in your tree... But in your DB, you want it to be DRY, so it only exists in one spot. To handle that, links are used. then you hydrate your query tree of links with db->tree. This is the meaning of the quote at the top of the "Thinking with links" wiki page: "There is no Tree, only Graph" -- The Ancients. Your DB is the graph, with nodes that POINT/REFER/LINK to other data, then you create a view of that graph and de-normalize it so the same data appears in many places, thus hydrating a graph into a tree so to speak.


I need to get myself on a different timezone. @ag I use compassus for routing, but the problem I have is based on routing a lower level component. Also, routes come from the url which is client-side, I want to route based on something from the server. I think it will work with mitchelkuijpers suggestion to bootstrap config into the html and then using optimistic updates when transacting.


hey everyone. little christmas eve problem: i am optimistically adding data to the state in my app, and then making a request to a server with the new item. i get back a confirmation hash that i want to merge back into the state (use it for later requests). so i am using the :send hook to make the request, and then the callback to update the state. there in lies the issue - the callback replaces the state. it does not properly merge.


i tried using the merge hook but can't really see why something like (cb {:items item-confirmation}) doesn't merge item-confirmation into the :items map.


it overwrites everyting that was in the :items map. also if it matters, my state is normalized