{"pageProps":{"post":{"title":"How to submit form data in post request using axios","excerpt":"Learn to submit form data in HTTP post request using axios","date":"2021-08-01T00:00:00.000Z","slug":"axios-post-form-data","author":{"name":"Suraj Sharma","picture":""},"content":"\n
\n\nIn this tutorial, you will learn how you can send submitted form data in a post request in React using axios.\n\n
\n\nConsider we have a `
\n```jsx\nimport React from 'react';\nimport axios from 'axios';\n\nconst LoginForm = () => {\n \n const [formValue, setformValue] = React.useState({\n email: '',\n password: ''\n });\n\n const handleSubmit = (event) => {\n // we will fill this in the coming paragraph\n }\n\n const handleChange = (event) => {\n setformValue({\n ...formValue,\n [event.target.name]: event.target.value\n });\n }\n\n return (\n