import React, { Component, PropTypes } from 'react'
class Main extends Component {
constructor(props, context) {
super(props, context);
this.state = {
inputValue: this.props.inputValue || ''
};
}
handleNameChange(e) {
this.setState({ inputValue: e.target.value });
}
render() {
return (
<div>
<input type='text' onChange={ ::this.handleInputChange } />
<div>input value: { this.state.inputValue }</div>
</div>
)
}
}
export default Main