title: How do I get submitted form value in React?
body: <p>Here is my React Component</p>
  
  <pre><code>import React, { Component } from 'react';
  import categories from './categories.json'
  import './content.css'
  
  export default class Content extends Component {
      constructor(props) {
          super(props)
          this.state = {
              searchText: '',
              categories
          }
      }
  
      render() {
          return(
              &lt;div className="content"&gt;
              &lt;form className="searchform" onSubmit={this.search}&gt;
                  &lt;input type="text" name="keyword" id="searchbox" placeholder="Search String"&gt;&lt;/input&gt;
                  &lt;select name="categories" id="searchcategories"&gt;
                  &lt;option defaultValue="" defaultChecked&gt;Select a category&lt;/option&gt;
                  {this.state.categories.map(x =&gt; 
                      &lt;option key={x.value} value={x.value}&gt;{x.name}&lt;/option&gt;
                  )}&lt;/select&gt;
                  &lt;input type="submit" value ="Search" id="searchsubmit" /&gt;
              &lt;/form&gt;
              &lt;/div&gt;
          )
      }
  
      search(e) {
          console.log(e.target)
          e.preventDefault();
      }
  }
  </code></pre>
  
  <p>On clicking the submit button, my function <code>search</code> does get called. However, how do I get the submitted values?</p>
  
  <p><code>e.target</code> gives me the whole form DOM HTML
  <code>e.target.value</code> is <code>undefined</code></p>