Hello React(ES5)

In this example below you will see how to do a Hello React(ES5) with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by 19920612, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright 19920612 ©

Technologies

  • HTML
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Hello React(ES5)</title>
  
  
  
  
  
</head>

<body>

  <div id="app"></div>
  <script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react-dom.min.js'></script>

  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/19920612/hello-reactes5-GMJVoE */
var HelloMessage = React.createClass({
  render: function() {
    return (
      React.createElement(
        "div",
        null,
        "Hello ",
        this.props.name
      )
    );
  }
 });
 ReactDOM.render(React.createElement(HelloMessage, { name: "React" }), 
  document.getElementById('app')
 );

Comments