Effects

public protocol Effects

A collection of Effects.

The only requirement for the protocol is to specify the type of the Environment which should be used in the Effects. The properties have default implementations.

  • The environment set up in the Store passed to every Effect.

    Declaration

    Swift

    associatedtype Environment
  • enabledEffects Default implementation

    The Effects to register on the Store. The default implementation takes all the Effects in the type,

    It is possible to implement the property manually to only enable a subset of Effects to enable.

    Default Implementation

    Declaration

    Swift

    var enabledEffects: [Effect<Environment>] { get }
  • id Default implementation

    The identifier for the Effects. The default implementation is just the name of the type.

    Default Implementation

    Declaration

    Swift

    static var id: String { get }