score:1

Accepted answer
export default function SomeForm() {
  const { inputRef, onChange, isValid } = useInput((value) =>
    value && value.includes("@")
  );
  console.log(isValid);

  return <Input ref={inputRef} onChange={onChange} />;
}

Related Query

More Query from same tag