Created
May 14, 2020 19:36
-
-
Save AlexanderBollbach/ce161d7c932bf6ac907f8d1f23428dda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension ViewStore where State == SomeState, Action == SomeAction { | |
var displayValue: String { | |
// do a bunch of querying on viewStore | |
return "" | |
} | |
func sendAction(with id: Int) -> Void { | |
// create a | |
if viewStore.isValid { | |
send(SomeAction.(at: id, value: SomeAction.SubAction.foo)) | |
} else { | |
// do nothing | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment