Last active
March 22, 2017 16:36
-
-
Save aakashns/085c4c4c30c59ff9303fda79eef57c7a to your computer and use it in GitHub Desktop.
Redux store for Firebase + Redux blog post.
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 reducer = (state = {}, action) => { | |
| switch(action.type) { | |
| case 'SET_MESSAGE': | |
| return { | |
| ...state, | |
| message: action.payload | |
| }; | |
| // Handle other actions here | |
| default: | |
| return state; | |
| } | |
| }; | |
| const store = createStore(reducer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment