428701 (1) [Avatar] Offline
#1
When trying to get the very first hello world example running the following errors occur

Uncaught SyntaxError: Unexpected token < react.js:7
Uncaught SyntaxError: Unexpected token < react-dom.js:7
Uncaught ReferenceError: React is not defined (index):9

Using http-static

Likely a simple way to fix but the solution is not obvious to a novice.

<html>
  <head>
    <script src="js/react.js"></script>
    <script src="js/react-dom.js"></script>
  </head>
  <body>
    <div id="content"></div>
    <script type="text/javascript">
      var h1 = React.createElement('h1', null, 'Hello world!')
      ReactDOM.render(
        h1,
        document.getElementById('content')
      )
    </script>
  </body>
</html>


easante (91) [Avatar] Offline
#2
Can you show the structure of your project directory and the contents of your js folder?