# Allow Property Wrappers with Multiple Arguments to Defer Initialization when wrappedValue is not Specified

**URL:** <https://forums.swift.org/t/allow-property-wrappers-with-multiple-arguments-to-defer-initialization-when-wrappedvalue-is-not-specified/38319>\
**Category:** Pitches\
**Tags:** propertywrapper\
**Created:** [July 9, 2020, 6:06am UTC](https://forums.swift.org/t/allow-property-wrappers-with-multiple-arguments-to-defer-initialization-when-wrappedvalue-is-not-specified/38319 "2020-07-09T06:06:36Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![nikitamounier](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nikitamounier/32/24825_2.png) [@nikitamounier](https://forums.swift.org/u/nikitamounier)\
**Post date:** [May 31, 2021, 9:38pm UTC](https://forums.swift.org/t/allow-property-wrappers-with-multiple-arguments-to-defer-initialization-when-wrappedvalue-is-not-specified/38319/22 "2021-05-31T21:38:21Z")

</div>

This would be really great – now that we're able to use property wrappers in function and closure parameters, this would go even further in improving the model. For instance, this could become a really valuable feature for @mbrandonw's and @stephencelis 's [Composable Architecture](https://github.com/pointfreeco/swift-composable-architecture) which is becoming increasingly popular (and for good reason!). For SwiftUI views, in TCA you pass down the store as a property, and then at each view create a "view store" which chisels away the store and the store's state to the bare essentials a view needs to do the job, for both ergonomics and performance. You can either do this using `WithViewStore`, or by using an `@ObservedObject var viewStore` and custom initialisation logic.

However, both of these methods have their own issues, which are talked about in [this thread](https://forums.swift.org/t/wrappedstore-property-wrapper-to-get-rid-of-boilerplate/49058). If we were able to defer initialization like proposed here, a new and really expressive syntax could be enabled:

```swift
@ViewStore(state: ViewState.init) var store: Store<AppState, AppAction>

```

or

```swift
@ViewStore(state: \.someState, action: AppAction.someAction) var store: Store<AppState, AppAction>

```

while being able to pass down the store from the parent view.  
As @hborla specified, this hopefully should be straightforward to implement, and could enable some really great APIs.

Big +1

---

_[View the full topic](https://forums.swift.org/t/allow-property-wrappers-with-multiple-arguments-to-defer-initialization-when-wrappedvalue-is-not-specified/38319)._
