architecture-samples icon indicating copy to clipboard operation
architecture-samples copied to clipboard

UDF experiment for producing state by merging flows

Open tunjid opened this issue 1 year ago • 0 comments

Produces state by merging flows that carry functions that lazily modify the state.

This avoids the issues that can arise when combining flows:

  • The limited arity of the combine function
  • The difficulty of merging the effects of user actions into the state production pipeline

There are a probably a few rough edges, but it has an element of consistency across all ViewModels.

This change has the interesting side effect of only being able to push state changes only if there is an observer of UI state. If there is no observer of state, all pending pushes will suspend until an observer is present. This one of the reasons for adding Turbine as a test dependency.

tunjid avatar Jun 25 '22 20:06 tunjid