SagaBuilder
class SagaBuilder<Payload>
Builder that is returned by the [[StatelessController]] to create and store a saga.
Template Parameters
register
public register(): ActionFn<Payload>
Completes the builder and adds the saga to the objectiveStore.
Returns
withAddressableName
public withAddressableName(name: string): SagaBuilder<Payload>
Adds a specific name to the saga so that it can be addressed without calling the specific action returned by this builder.
Parameters
Returns
withEffect
public withEffect(effectBuilder: EffectBuilder): SagaBuilder<Payload>
Adds a watcher to the saga.
Objective Redux provides some build in configurations, or custom one can be built by using the below paradigm.
Parameters
functions, such as configureTakeLatest or configureDebounce.
Returns
Examples
// Example of a customer configuration
export function configureExample(configurationParameters) {
// provides
// config.name the which is the action name targeting the saga
// config.sagaFn the saga function being wrapped
return function EXAMPLE(config) {
return function* () {
yield exampleEffect(config.name, config.sagaFn);
};
};
}