Last active
September 26, 2019 07:06
-
-
Save Jared-Dahlke/3e85694bfe2ccea5fe8c4b6718affc61 to your computer and use it in GitHub Desktop.
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
| import { createStore} from 'redux' | |
| const defaultState = { | |
| AlertCount: null | |
| }; | |
| function chatStore(state=defaultState, action) { | |
| switch(action.type) { | |
| case "SetAlertCount": | |
| return {...state, | |
| AlertCount: action.payload.AlertCount | |
| }; | |
| default: | |
| return state; | |
| } | |
| } | |
| export default createStore(chatStore); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment