Submit on click a radio input on react-hook-form

I’m using react-hook-form and I have to create a radio buttons form that submits when clicking an option. This is the code

const Form0 = () => {
  const { register, handleSubmit } = useForm();

  const submitFunction = (data) => {
    console.log("submitted:", data);
  };

  return (
    <form onSubmit={handleSubmit(submitFunction)}>
      <label>
        <input type="radio" value="foo" {...register("radio-button")} />
        foo
      </label>

      <label>
        <input type="radio" value="bar" {...register("radio-button")} />
        bar
      </label>

      <label>
        <input type="radio" value="foobar" {...register("radio-button")} />
        foobar
      </label>
    </form>
  );
};

I tried adding onClick={() => handleSubmit(submitFunction)} on each label but didn’t work. Also I tried changing all the input types to type="submit", but when clicking an input always submit the value of the first input.

Thanks in advance