React Form Component onSubmit Handler Not Working

后端 未结 4 748
滥情空心
滥情空心 2021-02-07 14:04

I have the following React component:

class Form extends React.Component {
  handleSubmit(e) {
    e.preventDefault();

           


        
4条回答
  •  不知归路
    2021-02-07 14:07

    For me, it was because the form didn't have an action property set.

提交回复
热议问题