The Composable Architecture (TCA)
Also called: TCA
A Swift library for building apps from features made of State, Action and a Reducer, with effects, controlled dependencies and exhaustive tests.
Definition
Each feature's reducer changes state in response to actions and returns effects for asynchronous work, which send more actions when they finish. Dependencies are resolved through the library so tests and previews can replace them, and TestStore checks every state change and received action. It brings strong consistency and testability at the cost of boilerplate and a framework that shapes the whole codebase.
In practice
Tapping favorite sets isFavorite = true immediately and rolls it back when the saveResponse action reports a failure.