Skip to content

bobey/reactjs-helloworld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic HelloWorld with ReactJS, Grunt and Browserify

This is code support for an article on my blog : http://blog.overnetcity.com

The article shows how to enhance the standard following HelloWorld, with Grunt and Browserify :

<!DOCTYPE html>
<html>
  <head>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.11.2/react.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.11.2/JSXTransformer.js"></script>
  </head>
  <body>
    <div id="content"></div>

    <script type="text/jsx">
      /** @jsx React.DOM */
      var hello = React.createClass({
        render: function() {
          return <div>Hello, {this.props.name}!</div>
        }
      });

      React.renderComponent(
        <hello name="World" />,
        document.getElementById('content')
      );
    </script>

  </body>
</html>

Bonus, the React library is loaded via a CDN while still used with browserify inside your code.

About

The article shows how to enhance the standard following HelloWorld, with Grunt and Browserify

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published