Fork me on GitHub

How are people handling load items from server (initial payloads etc..), a global :loading bool in app-db or actually substitute the values e.g. :people { :status :loading } -> :people { :status :ok :value [{p1}.{pe}] } ?/


@nowprovision: if you have N things to be loaded then, one way or another, you'll need N flags to indicate the success or otherwise. You can use the existence of the data itself as the flag of course. :people is nil if not loaded, or otherwise a value.


Of course, if there are errors, then you may want to keep them too. Which leads you back towards the {:status :ok :values [...] :error "timeout"}


thinking out load again, when using on-click #(dispatch blah) then wouldn't this break = and identical? causing un-necessary computation of the render payload.. However this is mitagated because render will only be called when either the props passed in changes or ratoms deref?


rethinking my design decisions again, here I have a free floating atom to work with re-agent forms proj, would it make more sense to use a cursor on the ratom instead


when I dispatch an event in a handler is there some guarantee that the app-state has changed (by current handler) when the dispatched event is handled?


@martinklepsch: yes, dispatches get serialized (via core.async channel)


@martinklepsch: btw. the router loop is really simple, it handles a single event at a time, in this loop:


yeah I remember seeing this before. The original reasons why I doubted suddenly vanished 😜


guys, if re-com/google closure throws a Uncaught TypeError: Cannot read property 'appendChild' of null, what am I doing wrong?


@richiardiandrea: this might not be related to re-frame or re-com, something just gets evaluated to null and you call .appendChild on it

richiardiandrea20:11:08 does it in crosspagechannel.js:485 parentElm.appendChild(iframeElm); I don't even know where it comes from, I assumed it was reframe


so parentElm is null for some reason, you have to figure out why


I’m not familiar with re-com, so I don’t know where it comes from


ok will investigate, maybe it is not related as you said


let your devtools break on exceptions and inspect call stack


@darwin clj-devtools is just so good


@darwin: it was due to the fact that my compiled js was included in <head> and not in <body>


can a :child of a box be a react component in re-com?