ObserverInterceptor

public struct ObserverInterceptor

Interceptor that can be use to observe behaviours and dispatch items as a response.

You can add as many ObserverInterceptor as you want to your application.

  • Creates a new ObserverInterceptor that observes the passed events

    Declaration

    Swift

    public static func observe(
      _ items: [ObserverType],
      notificationCenter: NotificationCenter = .default
    ) -> StoreInterceptor

    Parameters

    items

    the list of events to observe

    notificationCenter

    the notificationCenter used to listen to notifications

    Return Value

    the interceptor that observes the given items

  • Enum that contains the various events that can be observed

    See more

    Declaration

    Swift

    public enum ObserverType