Skip to content

Instantly share code, notes, and snippets.

@vahidvdn
Created January 6, 2022 09:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vahidvdn/6bb5d5218654558cd5d4335b1671ea94 to your computer and use it in GitHub Desktop.
Save vahidvdn/6bb5d5218654558cd5d4335b1671ea94 to your computer and use it in GitHub Desktop.
const mapDispatchToProps = (dispatch) => {
return {
deletePost: (id) => dispatch({type: 'DELETE_POST', id: id}),
addPost: (post) => dispatch({type: 'ADD_POST', post: post})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment