Skip to content

Instantly share code, notes, and snippets.

@muZk
Created October 4, 2017 14:47
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 muZk/7892bd61484e86aa0a05041beecf8b2f to your computer and use it in GitHub Desktop.
Save muZk/7892bd61484e86aa0a05041beecf8b2f to your computer and use it in GitHub Desktop.
const mapStateToProps = (state) => {
return {
isAdding: state.isAdding,
}
};
const mapDispatchToProps = (dispatch) => {
return {
toggleAdding: () => {
dispatch({ type:'TOGGLE_IS_ADDING' })
},
}
};
connect(mapStateToProps, mapDispatchToProps)(InputTodo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment