wayfair / vsm-ios

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

VSM Property Wrappers #26

Closed albertbori closed 1 year ago

albertbori commented 1 year ago

Description

This PR introduces two new types to VSM: ViewState and RenderedViewState. They are used instead of ViewStateRendering and StateContainer in both SwiftUI and UIKit views, respectively.

You can see the full proposal for these types here.

In addition, the entire demo Shopping app has been converted to use these new property wrappers and the ViewStateRendering protocol has been officially deprecated (with warnings). The sunsetting schedule for ViewStateRendering has yet to be determined.

StateContainer continues to act as the backbone of the VSM framework and underpins these new property wrappers. Its direct use by UI code is still considered valid (especially in non SwiftUI/UIKit projects).

A PR containing updates to the VSM documentation will follow immediately after this PR.

Type of Change

Checklist