Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- import LoginFormState from './formstate';
- const LoginForm = () => {
- const formData = new LoginFormState();
- return (
- <div className="login-form">
- <div className="login-form_field">
- <label>username</label>
- <input onChange={(e) => { formData.username.onChange(e.target.value); }} />
- </div>
- <div className="login-form_field">
- <label>password</label>
- <input onChange={(e) => { formData.password.onChange(e.target.value); }} />
- </div>
- <button type="button" onClick={formData.onSubmit}>submit</button>
- </div>);
- }
- export default LoginForm;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement