diff --git a/examples/basic-commonjs/README.md b/examples/basic-commonjs/README.md index bd9d2499fa..87025c46e2 100644 --- a/examples/basic-commonjs/README.md +++ b/examples/basic-commonjs/README.md @@ -2,6 +2,8 @@ Run `npm install` in the directory to install React from npm. Then run: - ./node_modules/.bin/browserify --debug --transform reactify ./index.js > ./bundle.js +```sh +npm start +``` to produce `bundle.js` with example code and React. diff --git a/examples/basic-commonjs/index.html b/examples/basic-commonjs/index.html index c9aeb2879f..a63f3016d3 100644 --- a/examples/basic-commonjs/index.html +++ b/examples/basic-commonjs/index.html @@ -19,7 +19,7 @@
This is written with JSX in a CommonJS module and precompiled to vanilla JS by running:
-browserify --debug --transform reactify index.js > bundle.js+
npm start
Learn more about React at
facebook.github.io/react.
diff --git a/examples/basic-commonjs/index.js b/examples/basic-commonjs/index.js
index 271595aeb9..ef90bbb89c 100644
--- a/examples/basic-commonjs/index.js
+++ b/examples/basic-commonjs/index.js
@@ -1,6 +1,7 @@
'use strict';
var React = require('react');
+var ReactDOM = require('react-dom');
var ExampleApplication = React.createClass({
render: function() {
@@ -16,7 +17,7 @@ var ExampleApplication = React.createClass({
var start = new Date().getTime();
setInterval(function() {
- React.render(
+ ReactDOM.render(