Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup #34

Open
trentgoing opened this issue Jul 10, 2020 · 0 comments
Open

Cleanup #34

trentgoing opened this issue Jul 10, 2020 · 0 comments

Comments

@trentgoing
Copy link

// import axios from 'axios';
// export const increaseCount = (value) => ({
// type: "INCREASE_COUNT",
// value: value,
// });
// export const getData = (data) => ({
// type: "GET_DATA",
// data: data,
// });
// export const getPosts = () => (dispatch) => {
// axios
// .get('http://18.224.200.47/products/list')
// .then(({ data }) => {
// console.log(data);
// dispatch(getData(data));
// })
// .catch((err) => console.log(err));
// };

const data = (state = [], action) => {
switch (action.type) {
case 'GET_DATA':
return action.data
default:
return state;
}
}
export default data;

Make sure to remove old reference code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant