Created
June 14, 2019 04:16
-
-
Save charly-palencia/897b2f7c22d8167fc2dcf2a7f144653c 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 { | |
| 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