import ComposableArchitecture
The Composable Architecture (TCA, for short) is a library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind. It can be used in SwiftUI, UIKit, and more, and on any Apple platform (iOS, macOS, tvOS, and watchOS).
protocol Reducer<State, Action>
A protocol that describes how to evolve the current state of an application to the next state, given an action, and describes what Effect
s should be executed later by the store, if any.
@attached(member, names: named(State), named(Action), named(init), named(body), named(CaseScope), named(scope)) @attached(memberAttribute) @attached(extension, conformances: Reducer, CaseReducer) macro Reducer()
Helps implement the conformance to the Reducer
protocol for a type.
@attached(member, names: named(State), named(Action), named(init), named(body), named(CaseScope), named(scope)) @attached(memberAttribute) @attached(extension, conformances: Reducer, CaseReducer) macro Reducer(state: _SynthesizedConformance..., action: _SynthesizedConformance...)
An overload of Reducer
that takes a description of protocol conformances to synthesize on the State and Action types