BindingAction and @ObservableState Migration in TCA 1.7 #3093
-
I'm in the process of migrating my project to TCA 1.7 and encountered an issue with binding in parent and child states. Here is the relevant code before and after the migration: The issue arises in the parent reducer after migration. Previously, I could match the binding action on .$isExpanded, but this no longer works with @ObservableState. How can I correctly handle this binding action with the new @ObservableState in TCA 1.7? Any help or guidance would be greatly appreciated! before 1.7
after 1.7
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@topkim993 you should be able to remove the "$" and change it to |
Beta Was this translation helpful? Give feedback.
@topkim993 you should be able to remove the "$" and change it to
.binding(\.isExpanded)
now. Here is one of the TCA case studies for reference:https://github.com/pointfreeco/swift-composable-architecture/blob/main/Examples/CaseStudies/SwiftUICaseStudies/01-GettingStarted-Bindings-Forms.swift