Skip to content

Commit 3c533b4

Browse files
tgrapperonmluisbrown
authored andcommitted
Capture state.count when entering .task in GettingStartted.md (#1330)
Fixes #1329. (cherry picked from commit 2014089c06c60302d8570b9e849c0246d126ac84)
1 parent 873d1da commit 3c533b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ let appReducer = Reducer<
116116
return .none
117117

118118
case .numberFactButtonTapped:
119-
return .task {
119+
return .task { [count = state.count] in
120120
await .numberFactResponse(
121-
TaskResult { try await environment.numberFact(state.count) }
121+
TaskResult { try await environment.numberFact(count) }
122122
)
123123
}
124124

0 commit comments

Comments
 (0)