From 4e7b0212d8f797580a90da1f11ce7b775272e473 Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Wed, 5 Mar 2014 20:16:50 -0800 Subject: [PATCH] [docs] Add more words to downloads page --- downloads.md | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/downloads.md b/downloads.md index b8d85bcf..0888d99f 100644 --- a/downloads.md +++ b/downloads.md @@ -57,15 +57,27 @@ The JSX transformer used to support [XML syntax](/react/docs/jsx-in-depth.html) All scripts are also available via [CDNJS](http://cdnjs.com/libraries/react/). -## Bower +## npm + +To install the JSX transformer on your computer, run: ```sh -$ bower install --save react +$ npm install -g react-tools ``` -## NPM +For more info about the `jsx` binary, see the [Getting Started](/react/docs/getting-started.html#offline-transform) guide. -```sh -$ npm install -g react-tools +If you're using an npm-compatible packaging system like browserify or webpack, you can use the `react` package. After installing it using `npm install react` or adding `react` to `package.json`, you can use React: + +```js +var React = require('react'); +React.renderComponent(...); ``` +If you'd like to use any [add-ons](/react/docs/addons.html), use `var React = require('react/addons');` instead. + +## Bower + +```sh +$ bower install --save react +```