我在 react-hook-form doc 中检查这个例子:https : //codesandbox.io/s/react-hook-form-v6-controller-qsd8r? file =/ src/ index.js
奇怪的是按钮没有type="submit"。但是点击后仍然触发提交事件。
type="submit"
它如何知道哪个按钮是提交按钮?
reactjs react-hook-form
react-hook-form ×1
reactjs ×1