Skip to content

Instantly share code, notes, and snippets.

@KTruong008
Created September 17, 2017 22:06
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 KTruong008/d361cd66ddb51faca42d21596c9d1593 to your computer and use it in GitHub Desktop.
Save KTruong008/d361cd66ddb51faca42d21596c9d1593 to your computer and use it in GitHub Desktop.
import React from 'react';
import { Field } from 'redux-form';
import Text from '../components/text';
export const FormComponent = ({ handleSubmit, onSubmit }) => {
return (
<div>
<h1>My Very own Form</h1>
<form onSubmit={handleSubmit(onSubmit)}>
<Field
name="firstName"
label="First Name"
component={Text}
/>
<button type="submit">Submit</button>
</form>
</div>
);
}
export default FormComponent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment