npm react-hook-form 7.68.0
Version 7.68.0

8 hours ago

🎧 feat: <FormStateSubscribe /> component (#13142)

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

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

  return (
    <div>
      <form>
        <input {...register('foo')} />
        <input {...register('bar')} />
      </form>
      {/* re-render only when formState of `foo` changes */}
      <FormStateSubscribe
        control={control}
        name={"foo"}
        render={({errors}) => <span>{errors.foo?.message}</span>}
      />
    </div>
  );
};

🐞 fix: clear validation errors synchronously in reset() to fix Next.js 16 Server Actions issue (#13139)
Revert "✨ fix(types): allow undefined value with async defaultValues in Contr…" (#13171)

thanks to @xiangnuans, @abnud11, @ntatoud & @ap0nia

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

NewReleases is sending notifications on new releases.