Skip to content

Instantly share code, notes, and snippets.

@kdichev
Created April 8, 2018 10:04
Show Gist options
  • Save kdichev/c5eb5bd0febfa6e70c5998c806518923 to your computer and use it in GitHub Desktop.
Save kdichev/c5eb5bd0febfa6e70c5998c806518923 to your computer and use it in GitHub Desktop.
reducers.js
import { combineReducers } from "redux";
const initialState = {
hi: "hi"
};
export const theReducer = (state = initialState, action) => {
switch (action.type) {
case "SOMETHING_HAPPENING":
return { ...state, hi: "bye" };
default:
return state;
}
};
const configureReducers = () =>
combineReducers({
theReducer
});
export default configureReducers;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment