Add a EffectTask<Action> typealias for Effect<Action, Never> and rename Effect to EffectPublisher (#1471)

* Add an `EffectOf<Action>` typealias for `Effect<Action, Never>`

* Fix doc

* Rename `EffectOf` to `EffectTask`

* Rename `Effect` to  `EffectPublisher`

* Soft-deprecate `Effect`

* Link to `EffectTask`

* Use `EffectPublisher` in Combine contexts

* Reword soft-deprecation message

* Remove `renamed:` fix-it for `Effect` deprecation

* Update Sources/ComposableArchitecture/Documentation.docc/Extensions/ReducerProtocol.md

Co-authored-by: Stephen Celis <stephen.celis@gmail.com>

* Update Sources/ComposableArchitecture/Documentation.docc/ComposableArchitecture.md

* Update Sources/ComposableArchitecture/Effect.swift

* Fix DocC identifiers

Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
This commit is contained in:
Thomas Grapperon
2022-10-17 19:16:46 -03:00
committed by GitHub
parent e726a13292
commit 41f1cb9f3f
99 changed files with 567 additions and 465 deletions

View File

@@ -4,7 +4,7 @@ import ComposableArchitecture
private struct Counter: ReducerProtocol {
typealias State = Int
typealias Action = Bool
func reduce(into state: inout Int, action: Bool) -> Effect<Bool, Never> {
func reduce(into state: inout Int, action: Bool) -> EffectTask<Bool> {
if action {
state += 1
return .none