Skip to content

Commit ab020e8

Browse files
authored
Fix typos in ReducerProtocol.swift and so on (#1638)
1 parent e93f02a commit ab020e8

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Examples/CaseStudies/SwiftUICaseStudies/01-GettingStarted-Composition-TwoCounters.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import SwiftUI
44
private let readMe = """
55
This screen demonstrates how to take small features and compose them into bigger ones using reducer builders and the `Scope` reducer, as well as the `scope` operator on stores.
66
7-
It reuses the the domain of the counter screen and embeds it, twice, in a larger domain.
7+
It reuses the domain of the counter screen and embeds it, twice, in a larger domain.
88
"""
99

1010
// MARK: - Feature domain

Sources/ComposableArchitecture/Documentation.docc/Articles/MigratingToTheReducerProtocol.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ struct TabC: ReducerProtocol {
201201
}
202202
```
203203

204-
But, suppose that the app-level domain and reducer has not yet be converted and so has compiler
204+
But, suppose that the app-level domain and reducer have not yet been converted and so have compiler
205205
errors due to referencing types and values that no longer exist:
206206

207207
```swift

Sources/ComposableArchitecture/ReducerProtocol.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@
4444
/// ```
4545
///
4646
/// The `reduce` method's first responsibility is to mutate the feature's current state given an
47-
/// action. It's second responsibility is to return effects that will be executed asynchronously
47+
/// action. Its second responsibility is to return effects that will be executed asynchronously
4848
/// and feed their data back into the system. Currently `Feature` does not need to run any effects,
4949
/// and so ``EffectPublisher/none`` is returned.
5050
///
5151
/// If the feature does need to do effectful work, then more would need to be done. For example,
5252
/// suppose the feature has the ability to start and stop a timer, and with each tick of the timer
53-
/// the `count` was incremented. That could be done like so:
53+
/// the `count` will be incremented. That could be done like so:
5454
///
5555
/// ```swift
5656
/// struct Feature: ReducerProtocol {
@@ -76,7 +76,7 @@
7676
/// state.count += 1
7777
/// return .none
7878
///
79-
/// case startTimerButtonTapped:
79+
/// case .startTimerButtonTapped:
8080
/// return .run { send in
8181
/// while true {
8282
/// try await Task.sleep(for: .seconds(1))
@@ -85,10 +85,10 @@
8585
/// }
8686
/// .cancellable(TimerID.self)
8787
///
88-
/// case stopTimerButtonTapped:
88+
/// case .stopTimerButtonTapped:
8989
/// return .cancel(TimerID.self)
9090
///
91-
/// case timerTick:
91+
/// case .timerTick:
9292
/// state.count += 1
9393
/// return .none
9494
/// }
@@ -115,7 +115,7 @@
115115
///
116116
/// At most one of these requirements should be implemented. If a conformance implements both
117117
/// requirements, only ``reduce(into:action:)-8yinq`` will be called by the ``Store``. If your
118-
/// reducer assembles a body from other reducers _and_ has additional business logic it needs to
118+
/// reducer assembles a body from other reducers _and_ has additional business logic, it needs to
119119
/// layer onto the feature, introduce this logic into the body instead, either with ``Reduce``:
120120
///
121121
/// ```swift
@@ -205,7 +205,7 @@
205205
/// > Important: if your reducer implements the ``reduce(into:action:)-8yinq`` method, it will
206206
/// > take precedence over this property, and only ``reduce(into:action:)-8yinq`` will be called
207207
/// > by the ``Store``. If your reducer assembles a body from other reducers and has additional
208-
/// > business logic it needs to layer into the system, introduce this logic into the body
208+
/// > business logic, it needs to layer into the system, introduce this logic into the body
209209
/// > instead, either with ``Reduce``, or with a separate, dedicated conformance.
210210
@ReducerBuilder<State, Action>
211211
var body: Body { get }
@@ -227,7 +227,7 @@
227227
///
228228
/// At most one of these requirements should be implemented. If a conformance implements both
229229
/// requirements, only ``reduce(into:action:)-8yinq`` will be called by the ``Store``. If your
230-
/// reducer assembles a body from other reducers _and_ has additional business logic it needs to
230+
/// reducer assembles a body from other reducers _and_ has additional business logic, it needs to
231231
/// layer onto the feature, introduce this logic into the body instead, either with ``Reduce``:
232232
///
233233
/// ```swift
@@ -315,7 +315,7 @@
315315
/// > Important: if your reducer implements the ``reduce(into:action:)-8yinq`` method, it will
316316
/// > take precedence over this property, and only ``reduce(into:action:)-8yinq`` will be called
317317
/// > by the ``Store``. If your reducer assembles a body from other reducers and has additional
318-
/// > business logic it needs to layer into the system, introduce this logic into the body
318+
/// > business logic, it needs to layer into the system, introduce this logic into the body
319319
/// > instead, either with ``Reduce``, or with a separate, dedicated conformance.
320320
@ReducerBuilder<State, Action>
321321
var body: Body { get }

0 commit comments

Comments
 (0)