Fork me on GitHub
#om
<
2017-06-29
>
danielstockton13:06:58

Shouldn't re-reads happen after the :action thunk has been called?

danielstockton14:06:21

I had a situation where I was calling a :ui/modal re-read after a transact! that updates it in a child but the parent which depended on that key way still receiving nil. I found an alternative workaround however.

denik17:06:20

@danielstockton they happen when the component re-renders, in the next requestAnimationFrame, which is why you can end up with stale props between transactions. Your app db is atomic, you can dupe your query and get the data there.

danielstockton17:06:55

makes sense thanks

Garrett Hopper18:06:46

Couldn't the create-element [method](https://github.com/omcljs/om/blob/master/src/main/om/dom.cljs#L75) use apply, so if there aren't any children, it won't be added. There are some Sementic-Ui-React component that complain if there are children, which forces me to call js/React.createElement manually. Proposed:

([tag opts & children]
   (apply js/React.createElement tag opts children))

anmonteiro19:06:40

might have to wait a little while until the next release

Garrett Hopper19:06:10

That's alright; it's not a big deal.