Skip to content

Instantly share code, notes, and snippets.

@aakashns
Last active March 22, 2017 16:36
Show Gist options
  • Select an option

  • Save aakashns/085c4c4c30c59ff9303fda79eef57c7a to your computer and use it in GitHub Desktop.

Select an option

Save aakashns/085c4c4c30c59ff9303fda79eef57c7a to your computer and use it in GitHub Desktop.
Redux store for Firebase + Redux blog post.
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