Fork me on GitHub
#re-frame
<
2023-11-16
>
Kimo21:11:21

Changed some things about flows: • you can subscribe to a flow with the regular (subscribe [:flow {:id :some-id}) ◦ flows have their own lifecycle. they're not cached like regular subscriptions. • :inputs and :live-inputs are top-level keys, both optional. • :output and :live? take a single arg - a map of resolved inputs. ◦ If there are no inputs (or live-inputs), they get passed app-db instead. • added some warnings against stale & cyclic dependencies • a flow id can be any value, not just a keyword • fixed some edge cases • tried putting flows in app-db, but it seems problematic. reverted. • simplified the live-docs code & explanations

p-himik21:11:18

The first point is definitely a breaking change. :flow is not a name that's unique enough. Perhaps the :flow ID can be configurable? E.g. (rf/enable-flows! {:subscription-id :flow}).

Kimo21:11:49

maybe just use :re-frame/flow

👍 1
p-himik21:11:22

Or :re-frame.core/flow, so that it can be aliased.

👍 1
Kimo21:11:22

I'm just not a fan of anything.core. re-frame isn't an apple.

🍎 1
p-himik22:11:59

Yeah, but from the practical standpoint IMO it makes more sense. core is already there, you can't get rid of it. Might as well use it to its full extent. and ::rf/flow is shorter than :re-frame/flow. :)

❤️ 3