Skip to content

Instantly share code, notes, and snippets.

@AndrewRayCode
Created September 9, 2018 19:12
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 AndrewRayCode/c7313e3f9ad3fac9d382e9868b538b2e to your computer and use it in GitHub Desktop.
Save AndrewRayCode/c7313e3f9ad3fac9d382e9868b538b2e to your computer and use it in GitHub Desktop.
export class MyUserForm extends Component {
constructor() {
this.state = { myFormData: {} };
}
render() {
const { myFormData } = this.state;
return (
<MagicForm onChange={data => this.setState({ myFormData: data })}>
<Input type="text" name="fieldName" value={myFormData.fieldName} />
</MagicForm>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment