Skip to content

Instantly share code, notes, and snippets.

@Evshved
Created August 7, 2018 18:18
Show Gist options
  • Save Evshved/f3eb1ba416b2765ea409a49e3446d725 to your computer and use it in GitHub Desktop.
Save Evshved/f3eb1ba416b2765ea409a49e3446d725 to your computer and use it in GitHub Desktop.
Example for Igor
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