This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-05
Channels
- # beginners (12)
- # calva (18)
- # cider (1)
- # cljs-dev (29)
- # clojure (97)
- # clojure-uk (18)
- # clojurescript (10)
- # clojureverse-ops (2)
- # cursive (7)
- # emacs (10)
- # fulcro (42)
- # graphql (36)
- # joker (1)
- # juxt (28)
- # mount (2)
- # other-languages (2)
- # pathom (1)
- # portkey (3)
- # re-frame (50)
- # shadow-cljs (42)
- # spacemacs (4)
- # sql (6)
- # yada (6)
I’ve been thinking about how it would be cool to be able to nav
igate a promise chain
I often have semi-long promise chains that fail somewhere in the middle and I end up having to go and add a bunch of prn
or tap>
to each link in the chain
it would be cool to be able to datafy
a promise chain and it would give you the current value of the first link and the then
attached to it, which you could call nav
on to resolve the next link in the chain, and so on
Seems like promises are often side effecting. Would you plan on firing the promise each time it's walked? Or have some data version of the chain that can be walked without executing?
they only fire once per instantiation, so you could resolve the next value and if it’s the first run, execute the effect maybe?
Seems like it'd be a non-standard use-case... I haven't delved much into datafy/nav yet, but my expectation is that the walking is a non-side-effecting process. So you might need some explanatory language around that.