I connect this way:

<script src="https://unpkg.com/react@16/umd/react.development.js"></script> <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> <script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script> <script src="assets/scripts/app.js"></script> 

I check with the console if there is a ReactDOM object, as I can see (if I understand everything correctly) However, it does not recognize HTML tags. What's wrong?

 // Это содержимое app.js console.log(ReactDOM); ReactDOM.render( <h1>Hello</h1>, document.getElementById('about-me__body') ); 

enter image description here enter image description here

    1 answer 1

    The fact that this is not javascript

    Simply downloading the browser version of Babel is not enough for the browser to suddenly start supporting JSX in ordinary tags with code. It is also necessary to mark the script with the appropriate type, text/babel . And this moment is covered in the installation documentation (section In the browser ) .

     <script type="text/babel" src="assets/scripts/app.js"></script> 

    ... then it will work.

    • Thank! I just just found this moment! - Igor