the request payload is transformed into query params after the post request request is received

The form element defaults to GET as action, and also you’ve not used preventDefault on the submit, so by default the form will make get request.

add form attribute method="post" on the form tag, and also add e.preventDefault() to handleSubmit.

some references Forms in react, Handling events

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top