tca migration

📁 willsigmon/sigstack 📅 Jan 1, 1970
4
总安装量
0
周安装量
#53825
全站排名
安装命令
npx skills add https://github.com/willsigmon/sigstack --skill TCA Migration

Skill 文档

TCA Migration

Remove The Composable Architecture from Leavn codebase.

Find TCA Usage

grep -r "Reducer" --include="*.swift" | grep -v "Pods\|DerivedData"
grep -r "Store\|ViewStore" --include="*.swift"
grep -r "@Dependency" --include="*.swift"
grep -r "ComposableArchitecture" --include="*.swift"

Migration Pattern

TCA Feature → @Observable ViewModel

Before (TCA):

@Reducer struct MyFeature {
  @ObservableState struct State { var count = 0 }
  enum Action { case increment }
  var body: some ReducerOf<Self> { ... }
}

After (@Observable):

@Observable @MainActor
class MyViewModel {
  var count = 0
  func increment() { count += 1 }
}

Removal Order

  1. Leaf features (no child reducers)
  2. Parent features (after children migrated)
  3. App-level store (last)
  4. Remove TCA from Package.swift

Audit Command

find . -name "*Feature.swift" -o -name "*Reducer.swift" | wc -l

Use when: TCA removal, migration tracking, @Observable conversion