Fork me on GitHub
#re-frame
<
2017-10-31
>
sandbags10:10:45

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

sandbags10:10:05

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

luposlip12:10:00

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!!

jeaye20:10:51

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?

jeaye20:10:00

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.

mikethompson21:10:52

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

mikethompson21:10:26

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 http://upgradingdave.com/blog/posts/2016-12-17-permutation.html

mikethompson21:10:32

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

jeaye21:10:49

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

jeaye21:10:51

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

jeaye21:10:51

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.

mikethompson21:10:08

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.

mikethompson21:10:25

------ 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 http://pyroclast.io/blog/2017/09/17/metamorphic.html

mikethompson21:10:03

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

mikethompson21:10:34

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)

mikethompson21:10:59

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

mikethompson21:10:49

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

danielneal09:11:15

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

danielneal09:11:29

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

danielneal09:11:27

(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)

danielneal09:11:17

I made this PR: https://github.com/Day8/re-frame-async-flow-fx/pull/10 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

joshkh22:10:20

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? 🙂