Guest User

Untitled

a guest
May 28th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. import React, { Component } from 'react';
  2.  
  3. class SignUp extends Component {
  4. constructor() {
  5. super();
  6. this.state = {value: ''};
  7. }
  8.  
  9. updateEmailField(event){
  10. const text = event.target.value
  11. this.setState({text})
  12. }
  13.  
  14.  
  15. render() {
  16. return (
  17. <div>
  18. <h1>{this.state.text}</h1>
  19. <input
  20. type='email'
  21. placeholder='pose un mail'
  22. onChange={this.updateEmailField.bind(this)} />
  23. </div>
  24. );
  25. }
  26. }
  27.  
  28. export default SignUp;
Add Comment
Please, Sign In to add comment