The Composable Architecture (TCA)
Opinionated state management architecture library for SwiftUI and UIKit, inspired by Redux and Elm. TCA structures apps as: State (data), Action (events), Reducer (pure state transform), and Store (runtime). Features a powerful dependency injection system, exhaustive testing utilities (TestStore), and reducer composition for building large apps from small, testable components. Created by Point-Free (Brandon Williams and Stephen Celis).
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Client-side architecture library — no network exposure. Dependency injection system makes credential management explicit. State is in-memory only. No external data transmission.
⚡ Reliability
Best When
You're building large, complex SwiftUI apps that need exhaustive testability, clear separation of concerns, and consistent state management patterns across a team.
Avoid When
Your team is small, the app is simple, or the team is new to functional programming — the productivity cost of TCA's learning curve outweighs benefits for simple apps.
Use Cases
- • Structure complex iOS agent apps with unidirectional data flow — TCA's reducer pattern makes state mutations predictable and traceable for debugging agent behavior
- • Test entire agent feature logic exhaustively using TCA's TestStore — verify that every action produces the expected state change and side effects without UI test setup
- • Compose agent UI features as independent TCA features that can be run standalone or embedded in parent features via Scope reducer
- • Manage asynchronous side effects (API calls, timers, notifications) using TCA's Effect system with structured concurrency and cancellation support
- • Implement dependency injection for testable agent features — TCA's @Dependency macro overrides dependencies in previews and tests without global state mutation
Not For
- • Simple iOS apps with minimal state — TCA's boilerplate overhead (State, Action, Reducer, Store for every feature) is overkill for small apps
- • Teams new to functional programming — TCA's concepts (reducers, effects, case paths, optics) have a steep learning curve
- • Apps targeting iOS 15 or earlier — TCA 1.0+ is structured concurrency-native and requires iOS 16+ for best experience
Interface
Authentication
TCA is an architecture framework — authentication is modeled as a TCA feature with AuthState, AuthAction, and AuthReducer. No built-in auth.
Pricing
TCA itself is MIT licensed and free. Point-Free offers excellent paid video courses that teach TCA concepts, but the library is free.
Agent Metadata
Known Gotchas
- ⚠ Exhaustive testing — TestStore requires every action sent to be received; unhandled actions from effects cause test failures that require explicitly ignoring with skipInFlightEffects
- ⚠ Case paths for enum State — TCA uses custom @CasePathable macro for enum cases; migration from older TCA (using /Case syntax) to newer version requires updating all switch statements
- ⚠ Store is a class with reference semantics — passing Store into child views must use .scope to create child stores; directly passing parent store causes children to observe all parent state
- ⚠ Effect cancellation must be explicit — long-running effects (timers, subscriptions) continue running unless .cancel(id:) action is sent; forgetting to cancel causes memory leaks
- ⚠ Sendable requirements — TCA 1.0+ requires State to be Sendable (value types or explicitly marked) for Swift 6 concurrency; non-Sendable types cause compiler warnings or errors
- ⚠ Large state trees cause SwiftUI view re-renders — withViewStore should observe only the minimal state needed; observing entire large State causes unnecessary redraws of complex views
Alternatives
Full Evaluation Report
Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for The Composable Architecture (TCA).
AI-powered analysis · PDF + markdown · Delivered within 30 minutes
Package Brief
Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.
Delivered within 10 minutes
Score Monitoring
Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.
Continuous monitoring
Scores are editorial opinions as of 2026-03-07.