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

Redux #32

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

Redux #32

trentgoing opened this issue Jul 10, 2020 · 0 comments

Comments

@trentgoing
Copy link

const mapDispatchToProps = (dispatch) => {
return {
fetchProductInfo: (id) => dispatch(fetchProductInfoAction(id)),
fetchProductStyleList: (id) => dispatch(fetchProductStyleListAction(id)),
metaDataAction: (elementId) => dispatch(metaDataAction(elementId)),
};
};

Nice job integrating with Redux. Here, it is working well to initialize the page and make that data available via the store. The current build only requires the store to be updated on first load. In order to level up with Redux use, try to consider how additional actions could be moved to redux. How would selecting a style be dispatched and reduced?

Same for Reviews, how would adding a review be integrated into Redux?

return {
getData: (url) => dispatch(getReviews(url)),
};

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