re-frame

Akiz 2023-12-20T18:00:54.056199Z

Hi, I needed to slow down third-layer sub and I’ve done it based on https://clojurians.slack.com/archives/C073DKH9P/p1600030259023900. Will the flows be better for this, will it support an interval (debouncing)?

Kimo 2023-12-21T12:35:40.611259Z

Seems like you could dispatch an event at regular intervals, then control the flow somehow so it's only live when that event runs. Then you'd have that kind of debouncey behavior where the calculation only runs on that particular event.

Kimo 2023-12-21T12:39:00.845949Z

A flow can have an input from the same app-db path as its output. Maybe that comes in handy too. A flow could output a value that causes it to become dead. Then, your event could make it live again, perhaps by registering it. Worth playing around with, maybe a nice pattern will emerge.

Kimo 2023-12-21T12:51:07.473609Z

Your :output function could return something like this: {:value "your calculation result" :dirty? false}. Then other events could set :dirty? true at the right time. And your :live? function could basically be a getter for that :dirty value.

👍 1