yarn react-hook-form 7.65.0
Version 7.65.0

one day ago

🧿 feat: <Watch /> component (#12986)

import { useForm, Watch } from 'react-hook-form';

const App = () => {
  const { register, control } = useForm();

  return (
    <div>
      <form>
        <input {...register('foo')} />
        <input {...register('bar')} />
      </form>
      {/* re-render only when value of `foo` changes */}
      <Watch
        control={control}
        names={['foo']}
        render={([foo]) => <span>{foo}</span>}
      />
    </div>
  );
};

🐞 fix: respect parent-provided useFieldArray rules (#13082) (#13083
🐞 fix: getDirtyFields submit fields with null values when using useForm (#13079)

thanks to @tesseractjh, @Han5991 & @jonathanarnault

Don't miss a new react-hook-form release

NewReleases is sending notifications on new releases.