A major release with a complete overhaul of the Redux pattern.
Idiomatic Redux pattern
New reducer to Effect
pattern
- In this context an
Effect
is essentially a Combine stream i.e.AnyPublisher<A, Never>
.
Changes
- Removed
Middleware
requirement - Introduced an
Environment
object to encapsulate dependencies for side effects - New
Reducer
function signature:typealias Reducer<A, S: Equatable, E> = (A, inout S, E) -> AnyPublisher<A, Never>
- Added a
statePublisher
property which mirrors the@Published state
property.