React Helloworld

In this example below you will see how to do a React Helloworld with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by enaqx, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright enaqx ©
  • HTML
  • CSS
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>React Helloworld</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div id="mount-point"></div>
  <script src='https://codepen.io/chriscoyier/pen/yIgqi.js'></script>
<script src='https://fb.me/react-0.12.0.js'></script>
<script src='https://fb.me/JSXTransformer-0.12.0.js'></script>

  

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




</body>

</html>

/*Downloaded from https://www.codeseek.co/enaqx/react-helloworld-aAcdk */
body { 
  text-align: center;
  padding: 40px; 
  font-weight: bold;
  font-size: 36px;
}

/*Downloaded from https://www.codeseek.co/enaqx/react-helloworld-aAcdk */
var Hello = React.createClass({
    render: function() {
        return React.DOM.div({}, 'Hello ' + this.props.name);
    }
});
Hello = React.createFactory(Hello);
 
React.render(
  <Hello name="World" />, 
  document.getElementById('mount-point'));

Comments