Skip to content

Instantly share code, notes, and snippets.

@benigumocom
Created April 14, 2017 15:49
Show Gist options
  • Save benigumocom/4deb5aec88b2bf09c1a44ac3cc070be3 to your computer and use it in GitHub Desktop.
Save benigumocom/4deb5aec88b2bf09c1a44ac3cc070be3 to your computer and use it in GitHub Desktop.
Reactive State 3
final class SubmitUiModel {
final boolean inProgress;
final boolean success;
final String errorMessage;
private SubmitUiModel(
boolean inProgress, boolean success, String errorMessage) {
// ...
}
static SubmitUiModel inProgress() { /* ... */ }
static SubmitUiModel success() { /* ... */ }
static SubmitUiModel failure(String errorMessage) { /* ... */ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment