Sultan Zhumatayev
Sultan Zhumatayev

Reputation: 555

Reactjs some "simple" issue

Why it don't want to work? Maybe i am doing all wrong?
I such us imported all requare libs,but console shows me weird error Uncaught SyntaxError: Invalid regular expression: /[ªµᅳ-ᅵ]/: Range out of order in character class at new RegExp ()

  <head>
    <title>More Components!</title>
    <script src="https://unpkg.com/react@15/dist/react.min.js"></script>
    <script src="https://unpkg.com/react-dom@15/dist/react-dom.min.js"></script>
   <script src="https://unpkg.com/[email protected]/babel.min.js"></script>

    <style>
      #container {
        padding: 50px;
        background-color: #FFF;
      }
    </style>
  </head>

  <body>
    <div id="container"></div>
    <script type="text/babel">
    function Welcome(props) {
      return <h1>Hello, {props.name}</h1>;
    }

    const element = <Welcome name="Sara" />;
    ReactDOM.render(
      element,
      document.getElementById('container')
    );
    </script>
  </body>

  </html>

Upvotes: 1

Views: 81

Answers (1)

Roman Schejbal
Roman Schejbal

Reputation: 626

You need to add charset into header for babel:

<head>
  <meta charset="utf-8" />
  ...

Upvotes: 1

Related Questions