Skip to content

Commit 6ef32b4

Browse files
committed
Adds default action of Never implementation
1 parent 818aa1c commit 6ef32b4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Sources/ViewStore/ViewStore.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@ public protocol ViewStore: ObservableObject {
2323
/// - Parameter action: The action to perform.
2424
func send(_ action: Action)
2525
}
26+
27+
/// Default implementation that allows stores with no actions to send to ignore this function requirement in the protocol.
28+
public extension ViewStore {
29+
func send(_ action: Never) {}
30+
}

0 commit comments

Comments
 (0)