Skip to content
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ requests to servers, but also seemingly innocuous things such as `UUID` and `Dat
file access, user defaults, and even clocks and timers, can all be thought of as dependencies.

You can get really far in application development without ever thinking about dependency management
(or, as some like to call it, "dependency injection), but eventually uncontrolled dependencies can
(or, as some like to call it, "dependency injection"), but eventually uncontrolled dependencies can
cause many problems in your code base and development cycle:

* Uncontrolled dependencies make it **difficult to write fast, deterministic tests** because you
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ print(Locals.value) // 1
Locals.$value.withValue(42) {
print(Locals.value) // 42
Task {
try await Task.sleep(for: .seconds(1)
try await Task.sleep(for: .seconds(1))
print(Locals.value) // 42
}
print(Locals.value) // 42
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ be executed for a particular request.
So, there are a lot of examples of "single entry point" systems out there, but it's also not the
majority. There are plenty of examples that do not fall into this paradigm, such as
`ObservableObject` conformances, all of UIKit and more. If you _are_ dealing with a single entry
point system, then there are some really great super powers that can be unlocked...
point system, then there are some really great superpowers that can be unlocked...

## Altered execution environments

One of the most interesting aspects of single entry point systems is that they have a well defined
One of the most interesting aspects of single entry point systems is that they have a well-defined
scope from beginning to end, and that makes it possible to easily alter their execution context.

For example, SwiftUI views have a powerful feature known as ["environment values"][env-values-docs].
Expand All @@ -89,7 +89,7 @@ struct ContentView: View {
```

The `.red` foreground color will be applied to every view in `HeaderView`, including deeply nested
views. And most importantly, that style is applied to only to the header and not to the
views. And most importantly, that style is applied only to the header and not to the
`FooterView`.

The `foregroundColor` view modifier is powered by [environment values][env-values-docs] under the
Expand Down
2 changes: 1 addition & 1 deletion Sources/Dependencies/Documentation.docc/Dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ requests to servers, but also seemingly innocuous things such as `UUID` and `Dat
file access, user defaults, and even clocks and timers, can all be thought of as dependencies.

You can get really far in application development without ever thinking about dependency management
(or, as some like to call it, "dependency injection), but eventually uncontrolled dependencies can
(or, as some like to call it, "dependency injection"), but eventually uncontrolled dependencies can
cause many problems in your code base and development cycle:

* Uncontrolled dependencies make it **difficult to write fast, deterministic tests** because you
Expand Down