Skip to content

Instantly share code, notes, and snippets.

@charly-palencia
Created June 14, 2019 04:16
Show Gist options
  • Select an option

  • Save charly-palencia/897b2f7c22d8167fc2dcf2a7f144653c to your computer and use it in GitHub Desktop.

Select an option

Save charly-palencia/897b2f7c22d8167fc2dcf2a7f144653c to your computer and use it in GitHub Desktop.
import {
UPDATE_COLOR,
} from "../actionTypes";
const initialState = {
color: "#282c34",
}
export default function authReducer(
state = initialState,
{type, color}
) {
switch (type) {
case UPDATE_COLOR:
return {
...state,
color
};
default:
return state;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment