title: How to log data from input onto the console in React
body: <p>I would like to know how to have it where when I press enter on my keyboard, it logs whatever is in the input onto the console. Please help. Thanks!</p>
  
  <pre><code>    import React, { Component } from 'react';
       import './App.css';
  
      class App extends Component {
        onClick() {
          alert("CLICKED");
        }
  
        onChange(eve) {
          console.log(eve.target.value);
        }
  
        onSubmit() {
          alert("SUBMITTED");
        }
  
        render() {
            const list = ["Lebron", "Kobe", "Steph", "Kevin"];
          return (
            &lt;div className="App"&gt;
             &lt;h1&gt;{
               list.map(listitem =&gt;{
                 return (
                 &lt;div onClick={this.onClick}&gt;
                  {listitem}
                &lt;/div&gt;
               )})
             }&lt;/h1&gt;
             &lt;form onSubmit={this.onSubmit}&gt;
               &lt;input onChange={this.onChange} /&gt;
             &lt;/form&gt;
            &lt;/div&gt;
          );
        }}
  
  export default App;
  </code></pre>
  
  <p>Please help!</p>