Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Render redux-form Fields component
const renderFields = fields =>
Object.keys(fields).map((name, i) => {
if (!fields[name].input) return null;
return (
<Grid item xs={12}>
<Field
key={name}
name={name}
label={fields.labels[i]}
{...fields[name]}
type="text"
/>
</Grid>
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment