Logo - Diego Naive, Noun Project.
npm install @lauf/store-follow --save
@lauf/store-follow provides simple async monitoring primitives to trigger business logic when application state changes. It builds upon @lauf/store, (a simple substitute for Flux/Redux based on Immer).
To find out more;
A control object for a Follower function to signal exit behaviour, retrieve references.
A type used as a special return value.
Function to process a queue of values including an initial starting value, leading to
Invokes the follower once with the initial value of
selector and again every time store has a changed
Selector. If follower is async, each invocation will
be awaited before the next is called.
follower is passed the new value each time, and also a
control object which can be used to exit the loop like
return control.exit(myValue). If
follower doesn't return an exit
instruction, its return value is ignored and it will be invoked again
on the the next
The store to follow
The function to extract the selected value
The callback to handle each changing value
Ending returned when exiting the loop
Store to monitor
Function that extracts the selected value
Function passed the initial selected value and queue
the value returned by
Generated using TypeDoc