title: Conditional Rendering,use-timeout Invalid hook call React
body: <p>When check is true I want to display Next button.I get errors like unexpected token,invalid hook call.
  Please help me.Thanks in advance.</p>
  
  <pre><code>import React from "react";
  import useTimeout from "use-timeout";
  
  class App extends React.Component {
    state = { check: true };
  
    handleCheck = () =&gt; {
      this.setState({ check: !this.state.check });
    };
    render() {
      useTimeout(() =&gt; {
        this.handleCheck();
      }, 10000);
      return (
        &lt;div&gt;
        {
         if(this.state.check){
          return &lt;button&gt;Next&lt;/button&gt; 
        }
       }
        &lt;/div&gt;
      );
    }
  }
  export default App;
  </code></pre>