-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move binding warning suppression to dynamic member lookup (#2740)
* Move binding warning suppression to dynamic member lookup In TCA it is considered a bug to send an action to a child feature when it is dismissed. In SwiftUI, a focused text field binding will write to itself when the view it is presented in is dismissed. So if you derive a TCA binding to a text field in a dismissable child feature, dismissing said feature will write to the text field and cause a warning to be emitted. To work around this, we set a task local, and are currently setting it in debug-only methods that construct a binding from scratch. Creating bindings from scratch unfortunately leads to issues with animations, so we should avoid doing so. Instead, we can leverage properties on store that bindings are derived from and suppress the warnings from there. * wip * wip * wip * wip * wip * wip
- Loading branch information
1 parent
4d9f171
commit efc79f9
Showing
4 changed files
with
177 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.