Fork me on GitHub

Hi @gregg right now I don't but I will try and cook one up so we can see how i fucked this up 🙂


hearty to know that actually it should work the way i was thinking


Hey guys! Someone experienced with the cljs/Cordova/re-frame combo for doing mobile app dev., that can help me finish my app (it’s close to done, just some minor details/functionality is missing)? PM me if you’re interested!!


re-frame still has the issue of ping ponging between events, in a similar fashion to callbacks. Has anyone seen a way to approach a more JS promise-like system while maintaining purity and loggability of events?


For complex sequences of actions like "do this animation, then this one, then change this state, then, once the user taps this, play this animation and have this effect" the ping ponging doesn't scale well.


@jeaye yeah, "overall coordination of events" needs work. Our first itch was scratched by re-frame-async-flow


I'm not sure about working at the level of animation sequencing. I think I'd like that to be more declarative. Our needs are met by react-flip-move


But at higher levels, often to do with the coordination of async actions, something is needed to provide overall "control flow"


Agreed. Thanks for the suggestions; I'm looking into re-frame-async-flow now.


Ah, I like how declarative it looks. Something like this for animation sequencing would be sweet.


I've also been looking for a good solution for animated buttons. In various spots in my app, I have buttons which, once tapped, are replaced with a spinner until the work is done. Manually adding the bool to the app-db, subscription for the bool, events for starting and finishing, and the spec makes for a lot of work that seems unnecessary.


The user has "an intent" when they click the button. That should be captured as an event and then processed by an event handler. That's the re-frame approach. So event handlers putting view stuff (bools) in app-db is fine.


------ Regarding the big picture ... (not animations) For anyone following along, I've become mildly interested in Complex event processing (CEP )as a possible solution to event coordination. Still early days and it might yet fall in a heap, or I might never have time to get it done ... have I qualified enough yet? ... But look at Metamorphic


It certainly provides for the ability to represent patterns of events, and then do something when they are detected.


Of course, the big, general solution is to have some way of representing a state machine, and then dispatch events on certain transitions in your state machine. (You need to be able to construct and tear down these machines, as needed)


re-frame-async-flow allows you to declarative create a domain specific (narrow) state machine, specifically for boot time (but with slightly broader applications).


Anyway, I mention this in case anyone has spare cycles and wants to design something sexy with CEP. Looks promising.


I'm very interested in seeing/helping with something that might be the next evolution with async-flow-fx


I feel like I've pushed up against it's limits a few times


(I've been trying to use it outside of boot time, for other handlers that need to do rest calls, update the ui, display loading indicators, handle errors and that kind of thing)


I made this PR: but that was more of a patch that makes it a bit more flexible; I think with a new library/rethink much more would be possible. More than we ever could have imagined


i remember seeing a doc/stack-overflow/gist that demonstrated local state outside the function of an effect. for instance, having a channel that could be closed / re-opened when the effect is called. if anyone knows what i'm talking about and has the link could they please share it? 🙂