I have the following React component:
class Form extends React.Component { handleSubmit(e) { e.preventDefault();
One obvious piece of information: do not forget to include your button inside the . I got stuck for a while until I figured out I had put my submit button outside my form, like this:
Add Login
hence the onSubmit event was not being called, and would never be.