Created
December 14, 2019 21:43
-
-
Save juliuscanute/bccdec724d112ae2115046eeb36bc81a to your computer and use it in GitHub Desktop.
Create a new state for navigate action
This file contains hidden or 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
| final emotionAppReducer = combineReducers<EmotionAppState>([ | |
| TypedReducer<EmotionAppState, NavigateToCreateEmotion>( | |
| _handleNavigateToCreateNewEmotion) | |
| ]); | |
| EmotionAppState _handleNavigateToCreateNewEmotion( | |
| EmotionAppState previousState, NavigateToCreateEmotion action) { | |
| EmotionAppState state; | |
| state = previousState.copy( | |
| newState: EmotionAppState(emoji: action.emoji, emotion: action.emotion)); | |
| return state; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment