Guest User

Untitled

a guest
Feb 21st, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. class Child extends Component {
  2. onChange() {
  3. this.props.onUpdate(this.inputEl.val)
  4. }
  5.  
  6. render() {
  7. return (
  8. <div>
  9. <input onChange={this.onChange} value={this.props.someFoo} ref={(el) => this.inputEl = el} />
  10. </div>
  11. )
  12. }
  13. }
Add Comment
Please, Sign In to add comment