You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -271,7 +271,7 @@ It is also straightforward to have a UIKit controller driven off of this store.
271
271
```
272
272
</details>
273
273
274
-
Once we are ready to display this view, for example in the app's entry point, we can construct a store. This can be done by specify the initial state to start the application in, as well as the reducer that will power the application:
274
+
Once we are ready to display this view, for example in the app's entry point, we can construct a store. This can be done by specifying the initial state to start the application in, as well as the reducer that will power the application:
However, how do we know what fact is going to be sent back to us?
331
331
332
-
Currently our reducer is using an effect that reaches out into the real world to hit an API server, and that means we have no way to control its behavior. We are at the whims of our internet connectivity and the availabilty of the API server in order to write this test.
332
+
Currently our reducer is using an effect that reaches out into the real world to hit an API server, and that means we have no way to control its behavior. We are at the whims of our internet connectivity and the availability of the API server in order to write this test.
333
333
334
334
It would be better for this dependency to be passed to the reducer so that we can use a live dependency when running the application on a device, but use a mocked dependency for tests. We can do this by adding a property to the `Feature` reducer:
335
335
@@ -371,7 +371,7 @@ struct MyApp: App {
371
371
}
372
372
```
373
373
374
-
But in tests we can use a mock dependency that immediately returns a determinstic, predictable fact:
374
+
But in tests we can use a mock dependency that immediately returns a deterministic, predictable fact:
375
375
376
376
```swift
377
377
@MainActor
@@ -515,7 +515,7 @@ You can add ComposableArchitecture to an Xcode project by adding it as a package
515
515
2. Enter "https://github.com/pointfreeco/swift-composable-architecture" into the package repository URL text field
516
516
3. Depending on how your project is structured:
517
517
- If you have a single application target that needs access to the library, then add **ComposableArchitecture** directly to your application.
518
-
- If you want to use this library from multiple Xcode targets, or mixing Xcode targets and SPM targets, you must create a shared framework that depends on **ComposableArchitecture** and then depend on that framework in all of your targets. For an example of this, check out the [Tic-Tac-Toe](./Examples/TicTacToe) demo application, which splits lots of features into modules and consumes the static library in this fashion using the **tic-tac-toe** Swift package.
518
+
- If you want to use this library from multiple Xcode targets, or mix Xcode targets and SPM targets, you must create a shared framework that depends on **ComposableArchitecture** and then depend on that framework in all of your targets. For an example of this, check out the [Tic-Tac-Toe](./Examples/TicTacToe) demo application, which splits lots of features into modules and consumes the static library in this fashion using the **tic-tac-toe** Swift package.
0 commit comments