score:1

Accepted answer
  1. you need to add a constructor to the class contact.

    class contact extends component {
      constructor(props) {
        super(props);
      }
      ...
    };
    
  2. putting dispatch(reset('contactform')) after return syntax, it would never get called. by the way, the action creator is supposed to be a pure function. adding dispatch action to it is not a good idea.

hope this help.

score:0

use

this.props.reset()

using this works on resetting the form after submit.


Related Query

More Query from same tag