title: Nothing is rendered when using state in Higher Order Component
body: <p>This is my code. If I comment the useState line in Hoc my renders text but not if I use useState hook.</p>
  <pre><code> const Hoc = (Component: any) =&gt; {
    const [myState, setMyState] = useState(true);
    return (props: any) =&gt; {
      return &lt;Component {...props} /&gt;;
    };
  };
  
  const Para = ({ name }: any) =&gt; &lt;p&gt;{name}&lt;/p&gt;;
  
  const MyApp = Hoc(Para);
  
  function App() {
    return &lt;MyApp name={&quot;Test Name&quot;} /&gt;;
  }
  
  export default App;
  </code></pre>