title: Do I have to use a constructor when importing an external module I made in React?
body: <p>I made a module in react.
  So, I imported the module. And then, the function of the external module was called using the constructor.</p>
  
  <pre><code>import { connect } from './api';
  ...
  
  class App extends Component {
    constructor(props) {
    super(props);
  
    connect(message =&gt; {
    console.log(message);
    });
   }
  
   render(){
    ...
   }  
  }
  </code></pre>
  
  <p><strong>But</strong> I would like to express class fields syntax without using a constructor.</p>
  
  <pre><code>import { connect } from './api';
  ...
  
  class App extends Component {
  
    connect(message =&gt; {
    console.log(message);
    });
  
    render(){
     ...
    }
  }
  </code></pre>
  
  <p>The results of the above code, 'connect' function is not executed because 'connect' is not declared.</p>
  
  <p>Can't I get an function of external module  without a constructor?</p>