Skip to content

Latest commit

 

History

History
56 lines (47 loc) · 933 Bytes

File metadata and controls

56 lines (47 loc) · 933 Bytes

react-starter

Version browserify

Installation :

npm install
npm install -g watchify

Lancement du watch :

npm run watch

Lancement du serveur :

npm run server

Version statique

<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>React Starter</title>
  <script src="http://fb.me/react-0.11.2.js"></script>
  <script src="http://fb.me/JSXTransformer-0.11.2.js"></script>
</head>
<body>
  <div id="app"></div>
  <script type="text/jsx">
    /** @jsx React.DOM */

    var HelloComponent = React.createClass({
      render: function() {
        return (
          <div>Hello, {this.props.name} !</div>
        );
      }
    });

    React.renderComponent(
      <HelloComponent name="React" />,
      document.getElementById('app')
    );

  </script>
</body>
</html>