Skip to content

Commit 0dc69e0

Browse files
committed
Convenience initialised for stateless ViewStore (#349)
1 parent 4a88a76 commit 0dc69e0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/ComposableArchitecture/ViewStore.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,14 @@ extension ViewStore where State: Equatable {
265265
}
266266
}
267267

268+
extension ViewStore where State == Void {
269+
public convenience init(_ store: Store<Void, Action>) {
270+
self.init(store, removeDuplicates: ==)
271+
}
272+
}
273+
268274
#if canImport(Combine)
269275
extension ViewStore: ObservableObject {
270276
}
271277
#endif
278+

0 commit comments

Comments
 (0)