Skip to content

Commit

Permalink
Fix descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
kalupas226 committed Mar 3, 2024
1 parent b817e34 commit 04d3c82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import SwiftUI

public struct RepositoryListView: View {
let store: StoreOf<RepositoryList>

public init(store: StoreOf<RepositoryList>) {
self.store = store
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@Section(title: "RowReducer の実装") {
@ContentAndMedia {
今はリポジトリ一覧画面に対して、`RepositoryList` という一つの Reducer が用意されている状態ですが、この Reducer をまず分解します。
具体的には、「一覧画面全体を管理する `RepositoryList` Reducer」と複数の「一覧画面の各 Row を管理する `RepositoryRow` Reducer」に分解していきます。
具体的には、「一覧画面全体を管理する `RepositoryList` Reducer」「一覧画面の各 Row を管理する `RepositoryRow` Reducer」に分解していきます。
いきなり一気に分解しようとしても混乱してしまうので、分解の前準備として `RepositoryRow` Reducer を実装していきましょう。
}
@Steps {
Expand Down Expand Up @@ -88,7 +88,7 @@
@ContentAndMedia {
Row のための Reducer と View の準備が終わったので、TCA の Composition 機能を使って Reducer と View を List に組み込んでいきましょう。
まずは、`RepositoryRow` Reducer を `RepositoryList` Reducer に組み込んでいきます。
その際に、`IdentifiedArrayOf`, `IdentifiedActionof`, `Reducer.forEach` という新しい API に触れることになります。
その際に、`IdentifiedArrayOf`, `IdentifiedActionOf`, `Reducer.forEach` という新しい API に触れることになります。

}
@Steps {
Expand Down Expand Up @@ -125,7 +125,7 @@
}
@Step {
最後に `RepositoryList` Reducer で `RepositoryRow` Reducer を動作させるために、二つの Reducer を接続する必要があります。
`RepositoryList` Reducer では複数の `RepositoryRow` Reducer が管理することとなりますが、このように複数のドメインを一つ一つ Composition するための機能として、`Reducer.forEach` という function が用意されています。
`RepositoryList` Reducer では複数の `RepositoryRow` Reducer を管理することとなりますが、このように複数のドメインを一つ一つ Composition するための機能として、`Reducer.forEach` という function が用意されています。
この `forEach` は、今までに定義してきた Row 用の `State`・`Action` の KeyPath を引数に指定しつつ、クロージャに対して `RepositoryRow` Reducer を提供することで利用できます。

@Code(name: "RepositoryListView.swift", file: 02-03-code-0004.swift)
Expand Down

0 comments on commit 04d3c82

Please sign in to comment.