Created
October 4, 2017 14:47
-
-
Save muZk/7892bd61484e86aa0a05041beecf8b2f to your computer and use it in GitHub Desktop.
This file contains 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 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