import React from 'react'; import {Field, FormSection, FieldArray, reduxForm} from '../../index'; const validateIsRequired = (value) => !value ? 'Field required.' : undefined; let id = 0; const getId = () => id++; const Users = (props) => { const {fields, pushUser} = props; const push = () => { if (pushUser) { pushUser(fields); } else { fields.push({id: getId()}); } }; return (
); }; const FormSectionExample = (props) => { const {handleSubmit} = props; return (
); }; export default () => { id = 0; return reduxForm({ form: 'simple', })(FormSectionExample); };