Commit b8b726c
authored
Add
This new reducer operator can be used to directly assign a dependency
key value to the reducer's dependencies.
```swift
// Before;
@dependency(\.apiClient) var apiClient
// ...
.dependency(\.apiClient, apiClient)
// After:
@dependency(APIClient.self) var apiClient
// ...
.dependency(apiClient)
```Reducer.dependency(value) (#2863)1 parent 434c648 commit b8b726c
File tree
1 file changed
+16
-0
lines changed- Sources/ComposableArchitecture/Reducer/Reducers
1 file changed
+16
-0
lines changedLines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
82 | 98 | | |
83 | 99 | | |
84 | 100 | | |
| |||
0 commit comments