catchToEffect deprecation without alternative for supported platform #1987
-
huge fan of TCA and your work. thanks so much for all your libraries. 🙏 currently working with the but, I'm getting deprecation warnings trying to use can this warning/deprecation be scoped to platforms that support the alternative? or is there some alternative I'm not aware of that would work without deprecation/warning as far back as and I'm hoping you aren't planning on removing this api soon, right? unless I'm missing something that would force a platform compat bump all the way to macos 12. apologies if there's something obvious i'm overlooking here. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hi @jaredh159! Not sure if you've pulled recently, but last week we added to the deprecation message to also suggest using You can then use return .publisher {
self.dependencyThatCanFail()
.map { .response(.success($0)) }
.catch { .response(.failure($0)) }
} I'm going to convert this to a discussion since I think it's more of a question than a bug. |
Beta Was this translation helpful? Give feedback.
Hi @jaredh159! Not sure if you've pulled recently, but last week we added to the deprecation message to also suggest using
Effect.publisher
, which acts as a Combine bridge for earlier for older platforms:swift-composable-architecture/Sources/ComposableArchitecture/Effects/Publisher.swift
Line 383 in 132cb3b
You can then use
Publisher.catch
and other Combine operations on the publisher in that block:I'm going to convert this to a discussion since…