wayfair / vsm-ios

An iOS framework for the VSM Architecture
MIT License
9 stars 2 forks source link

Change Custom Binding Recommendations #49

Open albertbori opened 1 month ago

albertbori commented 1 month ago

Problem Statement

Currently VSM documentation and the Demo app recommend using custom Bindings to sync SwiftUI view data with VSM view bindings. According to Point Free, using the custom Binding initializer that accepts a get and set closure, animations may not behave correctly.

Proposed Solution

A correction needs to be made to the documentation and demo app to deprecate the custom Binding approach in favor of some other syncing format.

Alternatives Considered

Incorporating the concept of Point Free's UIBinding into VSM. This may not be possible without significant tradeoffs or design decisions.

Additional Context

In the interim, engineers can independently choose to use other techniques for syncing VSM view state with SwiftUI view bindings.