Guest User

Untitled

a guest
Oct 16th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. import React from 'react';
  2.  
  3. class LoginForm extends React.Component {
  4. constructor() {
  5. super();
  6. this.state = {
  7. username: '',
  8. password: '',
  9. }
  10. }
  11. render() {
  12. return (
  13. <form> {/* Don't worry about a method or action for now */}
  14. <label htmlFor="username">Username: </label>{/* 'for' is a reserved word in JS, so in JSX we have to use htmlFor */}
  15. <input name="username" type="text" />
  16. <label htmlFor="password">Password: </label>
  17. <input name="password" type="password" />
  18. <button>Submit</button>
  19. </form>
  20. );
  21. }
  22. }
Add Comment
Please, Sign In to add comment