Created
October 2, 2019 12:54
-
-
Save indreklasn/16e2f819831d534a35b46be81108308f 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
const initialState = { | |
data: [ | |
{ | |
name: "Milton", | |
type: "cat", | |
age: 4 | |
}, | |
{ | |
name: "Sammy", | |
type: "dog", | |
age: 2 | |
}, | |
{ | |
name: "Joseph", | |
type: "turtle", | |
age: 34 | |
}, | |
{ | |
name: "Simon", | |
type: "dog", | |
age: 8 | |
} | |
] | |
}; | |
export default (state = initialState, action) => { | |
switch (action.type) { | |
default: { | |
return { ...state }; | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment