import React from 'react' class SMS extends React.Component { constructor() { super() this.handleChange = this.handleChange.bind(this) this.addRecipient = this.addRecipient.bind(this) this.submitForm = this.submitForm.bind(this) } handleChange (event) { event.preventDefault() this.props.smsActions.changeForm({ sender: this.sender.value, body: this.body.value, newRecipient: this.newRecipient.value }) } submitForm (event) { event.preventDefault() const state = this.props.sms this.props.smsActions.sendSMSRequest(state) } addRecipient (event) { event.preventDefault() this.props.smsActions.addRecipient(this.newRecipient.value) } removeRecipient (key, event) { event.preventDefault() this.props.smsActions.removeRecipient(key) } setRecipients (value, event) { event.preventDefault() this.props.smsActions.setRecipients(value) } render () { const state = this.props.sms const { sender, body, newRecipient } = state return (

SMS

Guthaben: {state.credit}

{this.sender = input})} value={sender} placeholder="Sender Name" onChange={this.handleChange}/>