Canceling long-living effects #1923
Replies: 1 comment
-
Hey @artemkrachulov. Indeed, cancelling from a Parent doesn't scale well, but this is more or less the only reliable way right now, given that You can sometimes tie your Please note that the upcoming |
Beta Was this translation helpful? Give feedback.
-
After more than one year of developing an app with SwiftUI and TCA I use one rule of canceling effects for optional sores or switching stores.
Rule:
App grows, views wrap to another view, logic gets more complicated, and releasing view states must be triggered from different reducers and places. Managing canceling effects becomes pain which produces leaks.
Is there a way to use
.onDissapear{}
modifier and cancel all effects one view disappears.Beta Was this translation helpful? Give feedback.
All reactions