SHARE
TWEET

Untitled

a guest Jul 16th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top