Created
August 7, 2018 18:18
-
-
Save Evshved/f3eb1ba416b2765ea409a49e3446d725 to your computer and use it in GitHub Desktop.
Example for Igor
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
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import './NewIssue.css'; | |
import { connect } from 'react-redux'; | |
import * as issueActions from '../../resources/issues/issues.actions'; | |
const NewIssue = (props) => { | |
return( | |
<button onClick={props.newIssue} className="btn btn-primary" type="button"> | |
New issue | |
</button> | |
); | |
}; | |
NewIssue.propTypes = { | |
newIssue: PropTypes.func, | |
}; | |
const mapDispatchToProps = (dispatch) => ({ | |
newIssue: issueActions.createIssue(dispatch) | |
}); | |
export default connect( | |
null, mapDispatchToProps | |
)(NewIssue); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment