title: 'setIsLoggedIn' is assigned a value but never used no-unused-vars
body: <pre><code>import { HashRouter as Router, Route, Switch } from &quot;react-router-dom&quot;;
  import Auth from &quot;../routes/Auth&quot;;
  import Home from &quot;../routes/Home&quot;;
  
  const AppRouter = () =&gt; {
      const [isLoggedIn, setIsLoggedIn] = useState(false);
      return (
          &lt;Router&gt;
              &lt;Switch&gt;
                  {isLoggedIn ? (
                      &lt;&gt;
                          &lt;Route exact path=&quot;/&quot;&gt;
                              &lt;Home /&gt;
                          &lt;/Route&gt; 
                      &lt;/&gt; 
                  ) : (
                      &lt;Route exact path=&quot;/&quot;&gt;
                          &lt;Auth /&gt;
                      &lt;/Route&gt;
                  )}
              &lt;/Switch&gt;
          &lt;/Router&gt;
      );
  };
  
  export default AppRouter;
  </code></pre>
  <p>and on terminal:</p>
  <pre><code>WARNING in [eslint] 
  src/components/Router.js
    Line 7:24:  'setIsLoggedIn' is assigned a value but never used  no-unused-vars
  
  webpack compiled with 1 warning
  </code></pre>
  <p>I downgraded react-router-dom version to 5.2.0 to use the Switch component. So there is nothing wrong with Switch component. But on terminal, there is still a warning sigh with: &quot;'setIsLoggedIn' is assigned a value but never used  no-unused-vars.&quot;;
  How to fix this problem?</p>