Fork me on GitHub
#re-frame
<
2022-05-16
>
James Amberger19:05:00

Hello. How best to achieve this? I have an event insert-staff-entry which dispatches http-post-staff I would have it update :db optimistically but I need a value from the post call in http-post-staff. Back in my old life using RxJS I would know just what to do with this. Do I write another event that http-post-staff should dispatch?

p-himik19:05:10

You create an event that would be handled as the completion stage of your POST HTTP request.

sansarip16:05:08

If you’re using https://github.com/day8/re-frame-http-fx, it would be the :on-success event