Skip to content

Commit 1d1ce31

Browse files
authored
Convenience initialised for stateless ViewStore (#349)
1 parent 5766b6a commit 1d1ce31

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/ComposableArchitecture/ViewStore.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,9 @@ extension ViewStore where State: Equatable {
230230
self.init(store, removeDuplicates: ==)
231231
}
232232
}
233+
234+
extension ViewStore where State == Void {
235+
public convenience init(_ store: Store<Void, Action>) {
236+
self.init(store, removeDuplicates: ==)
237+
}
238+
}

0 commit comments

Comments
 (0)