Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. import React from 'react';
  2. import LoginFormState from './formstate';
  3.  
  4. const LoginForm = () => {
  5. const formData = new LoginFormState();
  6. return (
  7. <div className="login-form">
  8. <div className="login-form_field">
  9. <label>username</label>
  10. <input onChange={(e) => { formData.username.onChange(e.target.value); }} />
  11. </div>
  12. <div className="login-form_field">
  13. <label>password</label>
  14. <input onChange={(e) => { formData.password.onChange(e.target.value); }} />
  15. </div>
  16. <button type="button" onClick={formData.onSubmit}>submit</button>
  17. </div>);
  18.  
  19. }
  20.  
  21. export default LoginForm;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement