title: Get React + JSX working on Google Cloud Functions
body: <p>Having difficulty getting a hello world react server-side rendering working on Google Cloud Functions. It boils down to two files:</p>
  
  <ul>
  <li>index.js</li>
  <li>package.json</li>
  </ul>
  
  <pre class="lang-js prettyprint-override"><code>import React from 'react'
  import ReactDOM from 'react-dom/server'
  
  class App extends React.Component {
    render() {
      return &lt;h1&gt;Hello!&lt;/h1&gt;
    }
  }
  
  /**
   * Responds to any HTTP request.
   *
   * @param {!express:Request} req HTTP request context.
   * @param {!express:Response} res HTTP response context.
   */
  exports.helloWorld = (req, res) =&gt; {
    const html = ReactDOM.renderToString(&lt;App /&gt;)
    res.status(200).send(html)
  };
  </code></pre>
  
  <pre><code>{
    "name": "my.project",
    "version": "0.0.1",
    "dependencies": {
      "@google-cloud/datastore": "^4.0.0",
      "@google-cloud/storage": "^2.5.0",
      "react": "^16.7.0",
      "react-dom": "^16.7.0",
      "@babel/preset-react": "*",
      "@babel/core": "*",
      "@babel/preset-env": "*",
      "babel-loader": "*"
    }
  }
  </code></pre>
  
  <p>When I deploy this in the google console from the browser, it errors saying only "Unknown resource type".</p>
  
  <p>Wondering how I get this basic hello world example of React with JSX working on Google Cloud Functions.</p>