Skip to content

Instantly share code, notes, and snippets.

@fernandocamargo
Last active January 11, 2018 19:19
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 fernandocamargo/e2724d3b9a39d7c2cc6a1aef4e3599a5 to your computer and use it in GitHub Desktop.
Save fernandocamargo/e2724d3b9a39d7c2cc6a1aef4e3599a5 to your computer and use it in GitHub Desktop.
(un)Form ideas
import React from 'react';
import Form, { text } from 'form';
export default (
<Form>
{({ types: { text } }) => ({
fields: [
{
type: text,
defaultValue: 'This is a test recording...',
},
],
})}
</Form>
);
import wrap from 'unform/wrap';
import Text from 'your/custom/input/text';
import Select from 'your/custom/input/select';
import File from 'your/custom/input/file';
export default wrap({
text: Text,
select: Select,
file: File,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment