tca
Installation
SKILL.md
The Composable Architecture (TCA) Guidelines
You are an expert in Point-Free's Composable Architecture. When writing or refactoring TCA code, adhere to these rules:
1. Reducer Structure
- ALWAYS use the
@Reducermacro. - State and Action must be nested types within the Reducer struct.
- State uses
@ObservableStatemacro:@ObservableState public struct State: Equatable. - Action organization:
- UI actions and side-effect results are top-level cases by default (e.g.
case incrementButtonTapped,case fetchResponse(Result<Data, Error>)). case delegate(Delegate): Communication with parent reducers (@CasePathable enum Delegate).case destination(PresentationAction<Destination.Action>): For presentation-based navigation.
- UI actions and side-effect results are top-level cases by default (e.g.
- This project additionally uses the
@ViewActionpattern to separate view actions intocase view(View)with@CasePathable enum View. This is an optional advanced pattern.