title: How to resolve this error: TypeError: this.state is not a function
body: <p>I couldn't resolve this problem, how do I fix this?</p>
  <pre><code>import React, { Component } from &quot;react&quot;;
  import &quot;./Main.css&quot;;
  import { FaSearch, FaEdit, FaWindowClose } from &quot;react-icons/fa&quot;;
  
  export default class Main extends Component {
    state = {
      pesquisaNFE: &quot;&quot;,
      resultado: [],
    };
  
    handleSubmit = (e) =&gt; {
      e.preventDefault();
      const { resultado } = this.state;
      let { pesquisaNFE } = this.state;
      pesquisaNFE = pesquisaNFE.trim();
  
      if (resultado.indexOf(pesquisaNFE) !== -1) return;
  
      const newSearch = [...resultado];
  
      this.state({
        resultado: [...newSearch, pesquisaNFE],
      });
    };
  </code></pre>
  <p>The error:</p>
  <p><img src="https://i.stack.imgur.com/blcOE.png" alt="enter image description here" /></p>