pfw-composable-architecture

Build Swift application features using the Composable Architecture library.

16|2|Updated Mar 29, 2018
One-click install
npx skills add https://github.com/khoi/dotfiles --skill pfw-composable-architecture-khoi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pfw-composable-architecture
Source: https://github.com/khoi/dotfiles/tree/main/chezmoi/dot_pfw/skills/composable-architecture
Command: npx skills add https://github.com/khoi/dotfiles --skill pfw-composable-architecture-khoi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Build Swift application features using the Composable Architecture (TCA) library.

Core Features & Use Cases

  • Declarative feature composition using TCA to manage state, actions, and reducers.
  • Modular feature development with scoped stores, dependencies, and child features.
  • Practical guidance for asynchronous work, cancellation, and UI integration with SwiftUI.

Quick Start

Initialize a Swift project and add the Composable Architecture package dependency to begin building features.

Frequently Asked Questions about pfw-composable-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage state and dependencies in Swift using the Composable Architecture?

You manage state and dependencies in Swift using the Composable Architecture by defining declarative reducers, scoped stores, and explicit action modeling. This handles modular feature development and dependency injection for iOS and macOS apps.

What is the best way to build modular iOS features with TCA?

Building modular iOS features with TCA involves on-demand composition of scoped stores and child features. This enables independent feature development with explicit state and action modeling per TCA guidelines.

How do I handle asynchronous work and cancellation in a TCA reducer?

You handle asynchronous work and cancellation in a TCA reducer by applying the library's built-in effects and cancellation APIs. This integrates async operations directly within your state management and SwiftUI UI workflows.

Does the Composable Architecture support dependency injection for macOS apps?

Yes, the Composable Architecture supports dependency injection for macOS apps. It provides scoped dependencies and modular feature composition capabilities across both iOS and macOS platforms.

How do I start a Swift project with the Composable Architecture package?

You start a Swift project with the Composable Architecture package by initializing your project and adding the TCA package dependency. This establishes the foundation for building features with state management and reducers.

Why use TCA for state management over other Swift architecture approaches?

You should use TCA for state management because it enforces explicit action and state modeling with declarative feature composition. This provides a structured approach to testing and UI integration compared to other Swift architectures.