public CompositeKnot<State> extends Store<State>
If your interface Knot becomes big and you want to improve its redability and maintainability, you may consider
to decompose it. You start decomposition by grouping related functionality into, in a certain sense,
indecomposable pieces called Primes.
Each Prime is isolated from the other Primes. It defines its own set of Changes, Actions and
Reducers. It's only the State, what is shared between the Primes. In that respect each Prime can
be seen as a separate interface Knot working on a shared State.
Once all Primes are registered at a CompositeKnot, the knot can be finally composed using
CompositeKnot.compose function and start operating.
| Modifier and Type | Method and Description |
|---|---|
void |
compose()
Finishes composition of
Primes and moves this knot into operational mode. |
<Change,Action> |
registerPrime(kotlin.jvm.functions.Function1<? super de.halfbit.knot.PrimeBuilder<State,Change,Action>,kotlin.Unit> block)
Registers a new
Prime at this composite knot. |
getDisposable, getState<Change,Action> void registerPrime(kotlin.jvm.functions.Function1<? super de.halfbit.knot.PrimeBuilder<State,Change,Action>,kotlin.Unit> block)
Registers a new Prime at this composite knot.
void compose()
Finishes composition of Primes and moves this knot into operational mode.