explain why this code doesn't work:
```
<body>
    <div id="app"></div>

    <script src="https://unpkg.com/react@17/umd/react.development.js"></script>
    <script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>

    <script type="text/javascript">
      const app = document.getElementById("app");
      const myComponent = () => {
        const name = "NAME_1";
        return ReactDOM.createElement("div", null, "Hello", name, "!");
      };
      React.render(myComponent(), app);
    </script>
  </body>
```