Skip to content

Commit 07e5b33

Browse files
authored
Edit Effect.swift annotations (#3299)
1 parent 7d6feb3 commit 07e5b33

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sources/ComposableArchitecture/Effect.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,19 +160,19 @@ extension Effect {
160160
///
161161
/// ```swift
162162
/// return .run { send in
163-
/// send(.started)
164-
/// defer { send(.finished) }
163+
/// await send(.started)
165164
/// for await event in self.events {
166165
/// send(.event(event))
167166
/// }
167+
/// await send(.finished)
168168
/// }
169169
/// ```
170170
///
171-
/// You can also send actions with animation:
171+
/// You can also send actions with animation and transaction:
172172
///
173173
/// ```swift
174-
/// send(.started, animation: .spring())
175-
/// defer { send(.finished, animation: .default) }
174+
/// await send(.started, animation: .spring())
175+
/// await send(.finished, transaction: .init(animation: .default))
176176
/// ```
177177
///
178178
/// See ``Effect/run(priority:operation:catch:fileID:filePath:line:column:)`` for more information on how to

0 commit comments

Comments
 (0)