om

Please ask the channel first, not @dnolen directly!
2017-03-14T11:28:17.603058Z

Is there any way to make a select component whose query does not compose back to root? I don't want to have to pass props through for every select, I thought I might be able to do this with an Ident.

2017-03-14T11:31:19.640005Z

The parser is being called but om doesn't seem to be passing props to the component. I made my own lookup table on state :select/by-id. I'm also adding the ident as a tailing argument to transact!

2017-03-14T11:41:38.758603Z

It would be a good fit for component local state but I would quite like to store things in app-state if possible.

2017-03-14T13:35:30.466939Z

is the component being re-rendered?

2017-03-14T14:03:59.107904Z

No dvingo.

2017-03-14T14:04:31.120766Z

I've changed it to use component local state for now but I'd like for it to be built into app-state so I can jump across all the states.

2017-03-14T14:05:21.140910Z

I thought maybe the component isn't being indexed because I'm not including the query in a parent and composing to root..

2017-03-14T14:16:22.402148Z

if it's not re-rendering but the data is updating in the reconciler you could try a "read transact" (om/transact [:select/by-id ~id]) i've used that pattern for remotes data updates to trigger updates, haven't tried from the parser though

2017-03-14T14:19:41.482176Z

ah, rereading what you said, i think you'll need the select component's query in your root, you may not have to pass the data down as long as its query is present in the root

2017-03-14T14:21:29.526474Z

I see, in that case I'd need a huge list of idents in my root component for all the select menus in my application

2017-03-14T14:22:09.542486Z

you may want to look into adding a new ui->props fn https://github.com/omcljs/om/blob/master/src/main/om/next.cljc#L2541

2017-03-14T14:22:31.551871Z

looks like you can have free reign into how a component gets its data

2017-03-14T14:30:54.762002Z

Oh, another hidden gem for me to abuse 🙂

2017-03-14T14:33:57.838844Z

haha yea, i haven't played with that yet, but i probably will get there - i'd really like to avoid having to wire all the state down the ui tree

tony.kay 2017-03-14T23:03:07.926266Z

I recently uploaded a video directed at helping people understand how we handle state, remotes, and the removal of a need for a client-side Om Next parser in Untangled. Thought it might be interesting to those of you that are thinking through the Om Next patterns. Might shed some light. https://www.youtube.com/watch?v=mT4jJHf929Q

🦜 5
2017-03-14T23:34:04.260612Z

this is great, thank you!