Skip to content

Commit 83b2c1b

Browse files
authored
Tutorial fixes and updates (#3003)
* Find-and-replace: Add `@testable import CounterApp` * Typo Fix: "you" -> "your" * Typo fix: It's -> its * Typo: `CounterFeature` -> `ContactsFeature` * Find-and-replace: Switch from deprecated `.navigationBarTitle()` to `navigationTitle()` * Typo: `using` -> `uses` * Add `@testable import CounterApp` to the Composing Feature section * Typo: `closet` -> `closest` * Remove mention of now-unused forward slash syntax for case paths
1 parent 3104c9b commit 83b2c1b

38 files changed

+68
-10
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ struct ChildView: View {
285285
}
286286
```
287287

288-
When `self.dismiss()` is invoked, SwiftUI finds the closet parent view that is presented in the
288+
When `self.dismiss()` is invoked, SwiftUI finds the closest parent view that is presented in the
289289
navigation stack, and removes that state from the collection powering the stack. This can be
290290
incredibly useful, but it is also relegated to the view layer. It is not possible to use
291291
`dismiss` elsewhere, like in an observable object, which would allow you to have nuanced logic

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ struct InventoryFeature {
8787
> Note: The key path used with `ifLet` focuses on the `@PresentationState` projected value since it
8888
> uses the `$` syntax. Also note that the action uses a
8989
> [case path](http://github.com/pointfreeco/swift-case-paths), which is analogous to key paths but
90-
> tuned for enums, and uses the forward slash syntax.
90+
> tuned for enums.
9191
9292
That's all that it takes to integrate the domains and logic of the parent and child features. Next
9393
we need to integrate the features' views. This is done by passing a binding of a store to one

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0001.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import ComposableArchitecture
22
import XCTest
33

4+
@testable import CounterApp
5+
46
@MainActor
57
final class CounterFeatureTests: XCTestCase {
68
func testCounter() async {

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0002.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import ComposableArchitecture
22
import XCTest
33

4+
@testable import CounterApp
5+
46
@MainActor
57
final class CounterFeatureTests: XCTestCase {
68
func testCounter() async {

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0004.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import ComposableArchitecture
22
import XCTest
33

4+
@testable import CounterApp
5+
46
@MainActor
57
final class CounterFeatureTests: XCTestCase {
68
func testCounter() async {

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0005.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import ComposableArchitecture
22
import XCTest
33

4+
@testable import CounterApp
5+
46
@MainActor
57
final class CounterFeatureTests: XCTestCase {
68
func testCounter() async {

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0006.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import ComposableArchitecture
22
import XCTest
33

4+
@testable import CounterApp
5+
46
@MainActor
57
final class CounterFeatureTests: XCTestCase {
68
func testCounter() async {
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import ComposableArchitecture
22
import XCTest
33

4+
@testable import CounterApp
5+
46
@MainActor
57
final class CounterFeatureTests: XCTestCase {
68
}

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0001.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import ComposableArchitecture
22
import XCTest
33

4+
@testable import CounterApp
5+
46
@MainActor
57
final class CounterFeatureTests: XCTestCase {
68
func testTimer() async {

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0002.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import ComposableArchitecture
22
import XCTest
33

4+
@testable import CounterApp
5+
46
@MainActor
57
final class CounterFeatureTests: XCTestCase {
68
func testTimer() async {

0 commit comments

Comments
 (0)