Last active
May 14, 2018 07:30
-
-
Save maylisdoucet/a945c800085c2fae29d91e9a622454e0 to your computer and use it in GitHub Desktop.
boîte email (fil rouge)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import SignUp from './SignUp.js' | |
class App extends Component { | |
render() { | |
return ( | |
<div> | |
<SignUp /> | |
</div> | |
); | |
} | |
} | |
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
class SignUp extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { email : 'Tape ton email' }; | |
this.updateEmailField= this.updateEmailField.bind(this) | |
} | |
updateEmailField(event) { | |
this.setState({email: event.target.value}); | |
} | |
render() { | |
return( | |
<div> | |
<h1>{this.state.email}</h1> | |
<input type="email" name="email" value={this.state.value} onChange={this.updateEmailField} /> | |
</div> | |
); | |
} | |
} | |
export default SignUp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment