我有这个bash脚本,它将在Mamp Pro中创建虚拟主机。
import React from 'react';
import SubMenu from './SubMenu';
import MessageForm from './form/MessageForm';
import { sendNewMessage } from '../../actions/messages.actions'
import {connect} from 'react-redux';
class Messages extends React.PureComponent {
handleSubmit = (e) => {
this.props.sendNewMessage(e.target.value);
}
render() {
return (
<section className="page-notifications">
<SubMenu/>
<MessageForm onSubmit={this.handleSubmit}/>
</section>
)
}
}
const mapDispatchToProps = dispatch => {
return {
sendNewMessage: (msg) => dispatch(sendNewMessage(msg)),
}
}
export default connect(null,mapDispatchToProps)(Messages)