om

Please ask the channel first, not @dnolen directly!
dnolen 2017-06-10T00:19:39.502403Z

@julianwegkamp at this point it doesn’t seem that important? we can link to the old docs

julianwegkamp 2017-06-10T00:33:47.569296Z

Perhaps not. I was triggered by om/IRender in the example but I think @anmonteiro already pointed that out in the PR

levitanong 2017-06-10T06:15:21.553743Z

If one is using pushy or goog.History, where would one put calls to these APIs in om.next? On one hand, it’s most straightforward to call it inside a mutate, but this is one of those things that don’t exactly touch app state, which leads me to think it should be contained in a remote. However, that seems a little roundabout. Does anyone have any ideas on the matter?

gmercer 2017-06-10T12:01:57.388816Z

@dnolen did you see this earlier - someone having problems with hello example out of the the box ?

gmercer 2017-06-10T12:02:38.390722Z

not me - I just repeated what they did

gmercer 2017-06-10T12:05:36.398576Z

slack-fu not that good ^^^ message from June 5th

dnolen 2017-06-10T12:43:59.499159Z

@gmercer haven’t but I also don’t time to look into it, I’m sure someone else can help

gmercer 2017-06-10T12:56:27.532317Z

nw - just thinking of the om OOTB experience

gmercer 2017-06-10T13:11:55.579129Z

i.e. .. to build an example run:

lein cljsbuild once <build-id>
from om landing page on github gives disappointing results

devth 2017-06-10T14:57:20.920745Z

given a component is there a way to traverse its children?

devth 2017-06-10T14:58:07.923315Z

i want to assemble the state of a top level component and all of its children, recursively

devth 2017-06-10T16:22:15.228776Z

next question: if a component A updates its parents' component state, A won't get re-rendered by default - how to force it?

gmercer 2017-06-10T16:25:07.239073Z

@dnolen bumping to clojurescript 1.9.562 will get examples compiling

2017-06-10T16:40:29.293003Z

I’m still having trouble wrapping my head around how om works, or at least, making sure I understand it correctly. Let me give an example what my current understanding is, please let me know whether it is correct or not. Assume I’m writing a Person component and I want be able to use it both as a item in a list of users and also as a singular, for example, displaying a selected user. There’s a :person/by-id key in the app state, containing map of ids to personal data. Person’s query’s going to be [:person/id :person/firstname :person/lastname]. The read` function for these keys will assume that env contains my own, custom key, e.g. :person/current-id, whose value is a person’s id and use it to extract corresponding id, firstname and lastname from the state. When displaying a list of persons, the query for the parent component will contain {:person/list (get-query Person}, read for :person/list will, for each person, recursively call parser with :person/current-id added to the env with id of the current person and collect results to a vector, render of parent will just iterate over the vector and pass each item to Person factory. When displaying a singular person, the query of the parent component will contain {:person/selected (get-query Person)}, read for person/selected will set :person/current-id in env to correct value, call parser recursively and return the result. If a Person component needs to do some changes in the state, it just uses the id it got in props: (transact! this '[(person/feed ~id)] (should be a backtick). Is this a correct approach? Sorry for the long-winded post...