Depends on specifics. If A, B, and C just happen once and that's it, then https://github.com/Day8/re-frame-async-flow-fx
There is also https://github.com/ingesolvoll/re-chain (although I've not used it)
Yes, it’s a one-time boot sequence. Thank you for the links 👍
I just had a weird bug, and even though it's fixed, I don't understand what's going on: The bug was that I had written an event handler with reg-event-fx, and only returned a :dispatch key, no :db. The thing is: it worked fine, so I guess I tried it and found that it's not necessary to type the extra :db a few times. But now I registered a global event handler, and suddenly things were going wrong, since the effects db was nil. I suppose there's a mechanism that copies the db if the effects db isnt there at the end of the chain? Is that something well known?
It is well known: https://github.com/day8/re-frame/blob/fd12bd3a2c92aae62508071c7b70f95e8eaa58fb/docs/Effects.md#db-not-always-needed Why it wasn't working with a global interceptor depends on what exactly was going on in that interceptor.
Ah yeah, thanks. As always, reading the docs better would have solved it 🙂
I’m running into an Eval timed out!
error message when trying to sub
some but not all of my subscriptions. Seems to be the ones with a lot of data, also seems to be associated with the error (which appears in nrepl buffer) WARN - Max payload length 4m, get: 4322857
, which i think is a websocket-related warning? Kind of stumped by this one. I’ve tried the easy stuff like lein clean
and restart repl, but no luck. This started happening recently too…
Where exactly do you get that error? In a browser JS console?
no, when I try to run the same subscription in the connected figwheel repl. Sorry, I should have mentioned that. The subs appear to work fine in the actual application, that is the functionality that relies on the subs works.
After doing a quick profile in chrome devtools, it indeed seems like there is an extremely large amount of pprint
thrash
and related functions, write-out
etc
ahah, yes, if I wrap the sub
call in e.g. type
, works fine. So definitely seems to be a printing issue
Yep, has nothing to do with re-frame. :)
thanks for letting me sound it out here, will head elsewhere