• Invokes the follower once with the initial value of selector and again every time store has a changed value of Selector. If follower is async, each invocation will be awaited before the next is called.

    The 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 Selector change.

    Type Parameters

    • State extends object

    • Selected

    • Ending

    Parameters

    • store: Store<State>

      The store to follow

    • selector: Selector<State, Selected>

      The function to extract the selected value

    • follower: Follower<Selected, Ending>

      The callback to handle each changing value

    Returns Promise<Ending>

    Any Ending returned when exiting the loop

Generated using TypeDoc