How to chain multiple handlers with augmented context? #691
Unanswered
piotr-yuxuan
asked this question in
Q&A
Replies: 2 comments
-
Edit: after looking to some other (unrelated) issues I figured out I may better ask it on https://clojurians.slack.com/archives/re-frame/p1485129928004725 so you may close this issue. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes, clojurians is the right channel. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there, thank you very much for this awesome FOSS project, it's always been a delight to use it and educate me to what "good design" is :-) The following is a question about how to achieve some pattern in re-frame, not really an issue. If you know about any discussion rooms where I could ask it, please just tell me and close this issue.
I'd like to chain effectful handlers. For example, let's say I want to retrieve n parent commits on GitHub git repository for Linux kernel: I'll issue a request to retrieve the last commit (with the standard http effectful handler). On success I dispatch another event which gets that commit retrieved + number n-1 of commits to be retrieved. Where should I put these data? Aren't they coeffect of the next event? Once I've got all the commits I should issue a final event which takes all these commits as coeffects, right? were should I put these data?
My first attempt was to use interceptors to express we need to gather some coeffects before we update
app-db
. However, how can I trigger an effectful handler from interceptor? is it ill-designed? It's completely possible I'm wrong and I miss something very trivial about re-frame design.Thank you in advance for your any kind reply. Once more, if it's not the place to ask such question, please just tell me where to I could seek help from and close this false issue.
Beta Was this translation helpful? Give feedback.
All reactions