Repository navigation
Replies: 3 comments
|
Is there an ETA for this feature (i.e. for when it will leave alpha)? This is something that I'd be very excited about. |
|
Hey there. We're hoping to get back to open-source work in the spring. But in general, we prefer to keep things in alpha for a long time. I'm still not sure if flows are right for re-frame. Maybe re-frame.subs.alpha is better? Or maybe alpha subscriptions and flows can be consolidated into a single feature. Any critique you have to share would be very useful. |
|
Hi @rads,
Flows store their output in app-db. I agree that this lowers some conceptual overhead. It also makes it very straightforward for an event handler access a flow's output value. By default, that value is eagerly computed, and cached forever. You can pause that computation using the On the other hand, flows change re-frame's aesthetic. Re-frame is arguably a form of "guard rails", promising a unified way to manage state. But, flows might enable us to make bigger messes. Subscriptions do feel well "separated" from the "essential state" (Mosely & Marks, 7.3.2), i.e., app-db. For instance, a dev wouldn't consider swapping a subscription's cached value as a way to fix a bug, or build a feature. Flows don't have that separation. By registering a graph of flows, have we diluted our essential state with accidental state & control? It might be up to us programmers to resist ambiguity - for instance, putting flow outputs under a dedicated I have colleagues who write all their own subscriptions and events. We don't have to understand each other's code. Instead, the structure of app-db is our common reference. With flows, how will they know what parts of app-db they can change (essential state), and what parts they should leave alone (derived state)? That said, I am still enjoying flows. They feel like backwards events.
This makes for some clean solutions. I currently maintain some complicated input forms. When their values change, we need to issue an api request. When api results arrive, we need to post-process and draw them. Except, there are so many details...
I use flows to express all those little details, purely in terms of app-db. Then, I can keep the form fields extremely basic. They just put their new values into app-db, totally naive of any API or view requirements. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Flows are a proposed feature for the next version of re-frame.
All reactions