MCPcopy Create free account
hub / github.com/deanrad/rxfx / createReplacingService

Function createReplacingService

service/src/createService.ts:581–597  ·  view source on GitHub ↗
(
  actionNamespace: string,
  handler: EventHandler<TRequest, TNext>,
  reducerProducer?: ReducerProducer<TRequest, TNext, TError, TState>
)

Source from the content-addressed store, hash-verified

579 * @summary ![switching mode](https://d2jksv3bi9fv68.cloudfront.net/rxfx/mode-switching-sm.png)
580 */
581export function createReplacingService<
582 TRequest,
583 TNext = void,
584 TError = Error,
585 TState = TNext | null
586>(
587 actionNamespace: string,
588 handler: EventHandler<TRequest, TNext>,
589 reducerProducer?: ReducerProducer<TRequest, TNext, TError, TState>
590): Service<TRequest, TNext, TError, TState> {
591 return createSwitchingServiceListener(
592 actionNamespace,
593 defaultBus,
594 handler,
595 reducerProducer
596 );
597}
598
599/**
600 * Creates a Service - a concurrency-controlled wrapper around an effect, which tracks state over the effect's lifecycle events.

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected