๐ฉโ๐ป Join our community of thousands of amazing developers!
A simple example implementation of the Redux pattern with multiple reducers and listeners. The name is derived from Swift + Redux = ๐๐ฆ Originally written at 2018-06-10 Definitions public final class Store<State, Action> { public typealias Reducer = (Action, inout State) -> Void public private(set) var state: State private var reducers: [Reducer] = [] private var callbacks: [Weak<Listener<State>>] = [] public init(initial state: State) { self.state = state } public func select(_ change...