StoreValue
@propertyWrapper
public struct StoreValue<State, Value> where Value : Equatable
A property wrapper for observing a value in the Store
.
import Fluxor
import SwiftUI
struct DrawView: View {
@StoreValue(Current.store, Selectors.canClear) private var canClear: Bool
var body: some View {
Button(action: { ... }, label: { Text("Clear") })
.disabled(!canClear)
}
}