Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { Component } from 'react';
- class SignUp extends Component {
- constructor() {
- super();
- this.state = {value: ''};
- }
- updateEmailField(event){
- const text = event.target.value
- this.setState({text})
- }
- render() {
- return (
- <div>
- <h1>{this.state.text}</h1>
- <input
- type='email'
- placeholder='pose un mail'
- onChange={this.updateEmailField.bind(this)} />
- </div>
- );
- }
- }
- export default SignUp;
Add Comment
Please, Sign In to add comment