View on GitHub

mini-swift

Minimal Flux architecture written in Swift.

CLASS

Store

public class Store<State: StateType, StoreController: Disposable>: ObservableType, StoreType

Properties

objectWillChange

public var objectWillChange: ObjectWillChangePublisher

dispatcher

public let dispatcher: Dispatcher

storeController

public var storeController: StoreController

state

public var state: State

initialState

public var initialState: State

reducerGroup

public var reducerGroup: ReducerGroup

Methods

init(_:dispatcher:storeController:)

public init(_ state: State,
            dispatcher: Dispatcher,
            storeController: StoreController)

notify()

public func notify()

replayOnce()

public func replayOnce()

reset()

public func reset()

subscribe(_:)

public func subscribe<Observer: ObserverType>(_ observer: Observer) -> Disposable where Observer.Element == Store.Element