title: Current React JS : 'state' is not defined no-undef
body: <p>I am learning ReactJS and I came across this error 
      'state' is not defined  no-undef
  Your assistance on where am going wrong. I have the current React "react": "^16.8.6". I tried adding in <strong>this.state</strong> instead I got:
  <code>Line 1:  'Component' is defined but never used         no-unused-vars</code>
  <code>Line 8:   Do not mutate state directly. Use setState()  react/no-direct-mutation-state</code></p>
  
  <p>App.js</p>
  
  <pre><code>import React, { Component } from 'react';
  import './App.css';
  import Todos from './Components/Todos';
  
  
  
  function App() {
    state = {
      todos:[
        {
          id:1,
          title: "Study File Structure",
          completed:false
        },
        {
          id:2,
          title: "Create Component",
          completed:false
        },
        {
          id:3,
          title: "Study State",
          completed:false
        }
      ]
    }
  
    return ( 
      &lt;div className="App"&gt;
  
        &lt;h1&gt;Hello&lt;/h1&gt;
        &lt;Todos/&gt;
      &lt;/div&gt;
    );
  }
  
  export default App;
  </code></pre>