title: React: How to do conditional checks from render() method in functional Components?
body: <p>In my normal React class Components, I have done some checks in the render() method, before returning conditional html rendering. Now, I was using a react functional component, which apparently does not have the render() method... how would I do the conditional checks here? Just Inside normal functions and then return html code from those functions?</p>
  
  <p>e.g Class Component: </p>
  
  <pre><code>render() {
  let test;
  if (this.state.test ===true) {
      test = (
      &lt;p&gt;This is a test&lt;/p&gt;
      )
  }
  
  return(
      {test}
  )
  }
  </code></pre>
  
  <p>in functional components? :</p>
  
  <pre><code>        return (            
              &lt;p &gt;
                  {checkIcon()} //normal Javascript functions?
              &lt;/p&gt;
          )
  </code></pre>