From 07e5b3340a6560e90d6d88dff9897e810beffb7a Mon Sep 17 00:00:00 2001 From: MaraMincho <103064352+MaraMincho@users.noreply.github.com> Date: Sat, 24 Aug 2024 00:41:45 +0900 Subject: [PATCH] Edit Effect.swift annotations (#3299) --- Sources/ComposableArchitecture/Effect.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/ComposableArchitecture/Effect.swift b/Sources/ComposableArchitecture/Effect.swift index e67dfee5aaf4..c097e0b93912 100644 --- a/Sources/ComposableArchitecture/Effect.swift +++ b/Sources/ComposableArchitecture/Effect.swift @@ -160,19 +160,19 @@ extension Effect { /// /// ```swift /// return .run { send in -/// send(.started) -/// defer { send(.finished) } +/// await send(.started) /// for await event in self.events { /// send(.event(event)) /// } +/// await send(.finished) /// } /// ``` /// -/// You can also send actions with animation: +/// You can also send actions with animation and transaction: /// /// ```swift -/// send(.started, animation: .spring()) -/// defer { send(.finished, animation: .default) } +/// await send(.started, animation: .spring()) +/// await send(.finished, transaction: .init(animation: .default)) /// ``` /// /// See ``Effect/run(priority:operation:catch:fileID:filePath:line:column:)`` for more information on how to