title: TypeError: Object(...) is not a function React
body: <p>I'm learning React from this <a href="https://www.youtube.com/playlist?list=PL4cUxeGkcC9ij8CfkAY2RAGb-tmkNwQHG" rel="noreferrer">channel</a>. Recently, I stumbled upon React Hooks from <a href="https://youtu.be/dpw9EHDh2bM?t=1598" rel="noreferrer">here</a>. So, I tried to convert a class based component to hook based. Here is my class based component: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React, { Component } from 'react';
  
  class AddNinja extends Component {
      state = {
          name: null,
          age: null,
          skill: null,
      }
      handleChange = e =&gt; {
          this.setState({
              [e.target.id]: e.target.value,
          })
      }
      handleSubmit = e =&gt; {
          e.preventDefault();
          this.props.addNinja(this.state);
      }
      render() {
          return (
              &lt;div&gt;
                  &lt;form onSubmit={ this.handleSubmit }&gt;
                      &lt;label htmlFor="name"&gt;Name: &lt;/label&gt;
                      &lt;input type="text" id="name" onChange={ this.handleChange } /&gt;
  
                      &lt;label htmlFor="age"&gt;Age: &lt;/label&gt;
                      &lt;input type="number" id="age" onChange={ this.handleChange } /&gt;
  
                      &lt;label htmlFor="skill"&gt;Skill: &lt;/label&gt;
                      &lt;input type="text" id="skill" onChange={ this.handleChange } /&gt;
  
                      &lt;button&gt;Submit&lt;/button&gt;
                  &lt;/form&gt;
              &lt;/div&gt;
          )
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here is my converted component:
  <a href="https://codesandbox.io/s/n0lw4wo550?module=%2Fsrc%2FAddNinja.js" rel="noreferrer">https://codesandbox.io/s/n0lw4wo550?module=%2Fsrc%2FAddNinja.js</a></p>
  
  <p>But I'm getting following error:</p>
  
  <p><a href="https://i.stack.imgur.com/U7CVV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/U7CVV.png" alt="enter image description here"></a></p>