We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22b37b8 commit 0442bfbCopy full SHA for 0442bfb
Sources/ComposableArchitecture/Store.swift
@@ -179,10 +179,12 @@ public final class Store<State, Action> {
179
}
180
181
182
+ /// Returns a "stateless" store by erasing state to `Void`.
183
public var stateless: Store<Void, Action> {
184
self.scope(state: { _ in () })
185
186
187
+ /// Returns an "actionless" store by erasing action to `Never`.
188
public var actionless: Store<State, Never> {
189
func absurd<A>(_ never: Never) -> A {}
190
return self.scope(state: { $0 }, action: absurd)
0 commit comments