title: How to add function in JSX?
body: <p>How do I add a JavaScript function in React, is this possible? I get 'function is not valid'.... </p>
  
  <pre><code>//Main component 
  function Main () {
  
  const vanilla_JS = function() { console.log('testing')}
  
   return (
    &lt;main&gt;
     &lt;div&gt;{vanilla_JS}&lt;/div&gt;
    &lt;/main&gt;
  
   )
  }
  
  ReactDOM.render(&lt;Main /&gt;, document.getElementById('root');
  </code></pre>