Skip to content

Instantly share code, notes, and snippets.

@Gauthamjm007
Created May 23, 2020 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gauthamjm007/48efb3fde73bc3c8d51a470c1b5b77f5 to your computer and use it in GitHub Desktop.
Save Gauthamjm007/48efb3fde73bc3c8d51a470c1b5b77f5 to your computer and use it in GitHub Desktop.
import React from "react";
import { Field, reduxForm } from "redux-form";
const Login = (props) => {
const { handleSubmit, pristine, reset, submitting } = props;
return (
<form onSubmit={handleSubmit}>
<div>
<label>Email</label>
<div>
<Field
name="email"
component="input"
type="email"
placeholder="Email"
/>
</div>
</div>
<div>
<label>Password</label>
<div>
<Field
name="password"
component="input"
type="password"
placeholder="Password"
/>
</div>
</div>
<div>
<button type="submit" disabled={pristine || submitting}>
Submit
</button>
</div>
</form>
);
};
export default reduxForm({
form: "simple",
})(Login);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment