N
N
Nikotin8882017-10-06 16:07:41
React
Nikotin888, 2017-10-06 16:07:41

React.js code not showing up in web page?

Don't be too hard on yourself, newbie. I really can't figure out what the problem is. Editor - Atom.
Maybe the library was not connected correctly or the plugin needs to be loaded into Atom? Help plz.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Hello World</title>
    <script src="js/react.development.js"></script>
    <script src="js/react-dom.development.js"></script>
    <script src="https://unpkg.com/[email protected]/babel.min.js"></script>
  </head>
  <body>

<div id="example"></div>

<script type="text/babel">
var Qwe = React.createClass({

render: function () {
  return (<h1>Qwerty</h1>);
}

});

ReactDOM.render(

<Qwe />,
document.getElementById("example")

);
</script>

  </body>
</html>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oblfakir, 2017-10-06
@Nikotin888

try connecting via CDN:

<script src="https://unpkg.com/[email protected]/babel.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/react.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/react-dom.min.js"></script>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question