Guest User

Untitled

a guest
Oct 17th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. import React, { Component } from 'react'
  2.  
  3. class Home extends Component {
  4. constructor(){
  5. super()
  6. this.state = {
  7. username: '',
  8. password: ''
  9. }
  10. }
  11.  
  12. updateVisitor(event){
  13. console.log('updateVisitor: ' + event.target.value)
  14. }
  15.  
  16. render(){
  17.  
  18. return(
  19. <div>
  20. <h2>Sign Up</h2>
  21. <input onChange={this.updateVisitor.bind(this)} type="text" placeholder="username" /><br />
  22. <input onChange={this.updateVisitor.bind(this)} type="password" placeholder="password" /><br />
  23. <button>Join</button>
  24. </div>
  25. )
  26. }
  27. }
  28.  
  29. export default Home
Add Comment
Please, Sign In to add comment