-
-
Save OliverJAsh/d8e91bee9d4a17075d5a0c42eddc03eb 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
// The `reducer` defines `transitions` for a given `state` | |
// and `event` (aka `action`) to the next `state` | |
const reducer = State.match({ | |
FetchingDimensions: () => | |
Action.match({ | |
FetchedDimensions: ({ dimensions }) => | |
checkDimensionsValid(dimensions) | |
? State.Uploading() | |
: State.Invalid() | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment