Fork me on GitHub

@zalkySo basically a middleware/interceptor for re-frame's event processing?


@ingesol, thanks for the response! The main stumbling block towards using interceptors for this use case was that the fn had to run once after all handled events, but before subscriptions/reactions synced. So: re-frame handles events -> (some-fn) -> render/sync -> re-frame handles events -> (some-fn) -> render/sync ... etc. Somehow the interceptor would have to be the last one processed in the handled event queue and I wasn't sure how to guarantee that. Maybe there was a way to do it in the end, with interceptors, or next-tick, but it felt like fighting against the framework. Taking a step back, I was luckily able to refactor the larger algorithm that this was a part of to avoid the pattern all-together.


@zalky Sounds like the way to go 🙂

😀 4