Created
April 21, 2018 11:04
-
-
Save CesarValiente/4d5ce35b46e2453cc12125dbb2d63730 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
private fun reduce(action: Action, currentState: State): State { | |
val newState = when (action) { | |
is CreationAction -> CreationReducer.reduce(action, currentState) | |
is UpdateAction -> UpdateReducer.reduce(action, currentState) | |
is ReadAction -> ReadReducer.reduce(action, currentState) | |
is DeleteAction -> DeleteReducer.reduce(action, currentState) | |
is NavigationAction -> NavigationReducer.reduce(action, currentState) | |
} | |
return newState | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment