How to use react-final-form-arrays - 1 common examples

To help you get started, we’ve selected a few react-final-form-arrays examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github urbit / bridge / src / form / EmailChipInput.js View on Github external
const EmailChipInput = ({ className, name, label, disabled }) => {
  const {
    fields,
    meta: { error, active },
  } = useFieldArray(name, { subscription: { error: true, active: true } });

  const [value, setValue] = useState('');

  const handleChange = useCallback(
    event => {
      event.preventDefault();
      setValue(event.target.value);
    },
    [setValue]
  );

  const addToChips = useCallback(() => {
    fields.push(value);
    setValue('');
  }, [value, fields, setValue]);

react-final-form-arrays

A component for rendering and editing arrays 🏁 React Final Form

MIT
Latest version published 2 years ago

Package Health Score

61 / 100
Full package analysis

Popular react-final-form-arrays functions

Similar packages