Skip to content

Fix typos in ReducerProtocol.swift #1638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SwiftUI
private let readMe = """
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.
It reuses the the domain of the counter screen and embeds it, twice, in a larger domain.
It reuses the domain of the counter screen and embeds it, twice, in a larger domain.
"""

// MARK: - Feature domain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ struct TabC: ReducerProtocol {
}
```

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

```swift
Expand Down
18 changes: 9 additions & 9 deletions Sources/ComposableArchitecture/ReducerProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
/// ```
///
/// The `reduce` method's first responsibility is to mutate the feature's current state given an
/// action. It's second responsibility is to return effects that will be executed asynchronously
/// action. Its second responsibility is to return effects that will be executed asynchronously
/// and feed their data back into the system. Currently `Feature` does not need to run any effects,
/// and so ``EffectPublisher/none`` is returned.
///
/// If the feature does need to do effectful work, then more would need to be done. For example,
/// suppose the feature has the ability to start and stop a timer, and with each tick of the timer
/// the `count` was incremented. That could be done like so:
/// the `count` will be incremented. That could be done like so:
///
/// ```swift
/// struct Feature: ReducerProtocol {
Expand All @@ -76,7 +76,7 @@
/// state.count += 1
/// return .none
///
/// case startTimerButtonTapped:
/// case .startTimerButtonTapped:
/// return .run { send in
/// while true {
/// try await Task.sleep(for: .seconds(1))
Expand All @@ -85,10 +85,10 @@
/// }
/// .cancellable(TimerID.self)
///
/// case stopTimerButtonTapped:
/// case .stopTimerButtonTapped:
/// return .cancel(TimerID.self)
///
/// case timerTick:
/// case .timerTick:
/// state.count += 1
/// return .none
/// }
Expand All @@ -115,7 +115,7 @@
///
/// At most one of these requirements should be implemented. If a conformance implements both
/// requirements, only ``reduce(into:action:)-8yinq`` will be called by the ``Store``. If your
/// reducer assembles a body from other reducers _and_ has additional business logic it needs to
/// reducer assembles a body from other reducers _and_ has additional business logic, it needs to
/// layer onto the feature, introduce this logic into the body instead, either with ``Reduce``:
///
/// ```swift
Expand Down Expand Up @@ -205,7 +205,7 @@
/// > Important: if your reducer implements the ``reduce(into:action:)-8yinq`` method, it will
/// > take precedence over this property, and only ``reduce(into:action:)-8yinq`` will be called
/// > by the ``Store``. If your reducer assembles a body from other reducers and has additional
/// > business logic it needs to layer into the system, introduce this logic into the body
/// > business logic, it needs to layer into the system, introduce this logic into the body
/// > instead, either with ``Reduce``, or with a separate, dedicated conformance.
@ReducerBuilder<State, Action>
var body: Body { get }
Expand All @@ -227,7 +227,7 @@
///
/// At most one of these requirements should be implemented. If a conformance implements both
/// requirements, only ``reduce(into:action:)-8yinq`` will be called by the ``Store``. If your
/// reducer assembles a body from other reducers _and_ has additional business logic it needs to
/// reducer assembles a body from other reducers _and_ has additional business logic, it needs to
/// layer onto the feature, introduce this logic into the body instead, either with ``Reduce``:
///
/// ```swift
Expand Down Expand Up @@ -315,7 +315,7 @@
/// > Important: if your reducer implements the ``reduce(into:action:)-8yinq`` method, it will
/// > take precedence over this property, and only ``reduce(into:action:)-8yinq`` will be called
/// > by the ``Store``. If your reducer assembles a body from other reducers and has additional
/// > business logic it needs to layer into the system, introduce this logic into the body
/// > business logic, it needs to layer into the system, introduce this logic into the body
/// > instead, either with ``Reduce``, or with a separate, dedicated conformance.
@ReducerBuilder<State, Action>
var body: Body { get }
Expand Down