title: How to handle POST request in reactjs?
body: <p>I have my ReactJS app running in <a href="http://localhost:3000/" rel="noreferrer">http://localhost:3000/</a>. I am receiving below form data to my React page as a POST request</p>
  
  <pre><code>&lt;form action="http://localhost:3000/" method="post"&gt;
    Employee Id: &lt;input type="text" name="eid"&gt;&lt;br&gt;
    Department Id: &lt;input type="text" name="did"&gt;&lt;br&gt;
    &lt;input type="submit" value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>My react app should be able to handle this POST request and render the UI as below</p>
  
  <pre><code>&lt;h1&gt;{eid}&lt;/h1&gt;
  &lt;h1&gt;{did}&lt;/h1&gt;
  </code></pre>
  
  <p>I am able to handle GET request using react router but struggling to handle POST request. How can I achieve this?</p>