Skip to content

Commit 9894e7e

Browse files
committed
Merge pull request #22 from yungsters/docs
[docs] Revise marketing copy around JSX.
2 parents 7dd4576 + 5fc2aad commit 9894e7e

File tree

4 files changed

+33
-33
lines changed

4 files changed

+33
-33
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
React is a JavaScript library for building user interfaces.
44

55
* **Declarative:** React uses a declarative paradigm that makes it easier to reason about your application.
6-
* **Efficient:** React minimizes interactions with the DOM by using a mock representation of the DOM.
6+
* **Efficient:** React computes the minimal set of changes necessary to keep your DOM up-to-date.
77
* **Flexible:** React works with the libraries and frameworks that you already know.
88

99
[Learn how to use React in your own project.](http://facebook.github.io/react/docs/getting-started.html)

docs/_config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2+
pygments: true
23
name: React
3-
markdown: redcarpet
4-
baseurl: /react
54
react_version: 0.3.0
6-
redcarpet:
7-
extensions:
8-
- fenced_code_blocks
9-
pygments: true
105
exclude:
116
- Gemfile
127
- Gemfile.lock
138
- README.md
149
- Rakefile
10+
redcarpet:
11+
extensions:
12+
- fenced_code_blocks
13+
markdown: redcarpet
14+
baseurl: /react

docs/docs/syntax.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,25 @@ prev: common-questions.html
77
next: component-basics.html
88
---
99

10-
JSX is a JavaScript XML syntax extension recommended (but not required) for use
10+
JSX is a JavaScript XML syntax transform recommended (but not required) for use
1111
with React.
1212

13-
JSX makes code that deeply nests React components more readable, and writing it
14-
feels like writing HTML. React documentation examples make use of JSX.
15-
1613
## Why JSX?
1714

18-
First of all, **don't use JSX if you don't like it!** All of React's features
19-
work just fine without using JSX. Simply construct your markup using the functions
20-
on `React.DOM`. For example, here's how to construct a simple link:
15+
First of all, **don't use JSX if you don't like it!**
16+
17+
React works out of the box without JSX. Simply construct your markup using the
18+
functions on `React.DOM`. For example, here's how to construct a simple link:
2119

2220
```javascript
23-
var mylink = React.DOM.a({href: 'http://facebook.github.io/react'}, 'Hello React');
21+
var link = React.DOM.a({href: 'http://facebook.github.io/react'}, 'React');
2422
```
2523

26-
However, we like JSX for a bunch of reasons:
24+
We recommend using JSX for many reasons:
2725

28-
- It's easier to visualize the structure of the DOM
29-
- Designers are more comfortable making changes
30-
- It's familiar for those who have used MXML or XAML
26+
- It's easier to visualize the structure of the DOM.
27+
- Designers are more comfortable making changes.
28+
- It's familiar for those who have used MXML or XAML.
3129

3230
## The Transform
3331

docs/index.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,21 @@ layout: page
33
title: A JavaScript library for building user interfaces
44
id: home
55
---
6+
67
<section class="light home-section">
78
<div class="marketing-row">
89
<div class="marketing-col">
9-
<h3>The &quot;V&quot; in MVC</h3>
10+
<h3>Declarative</h3>
1011
<p>
11-
Write reusable UI components in JavaScript. Read and write to any data source.
12+
React uses a declarative paradigm that makes it easier to reason about
13+
your application.
1214
</p>
1315
</div>
1416
<div class="marketing-col">
15-
<h3>Fast &amp; Declarative</h3>
17+
<h3>Efficient</h3>
1618
<p>
17-
Describe how you want your component to look. React will automatically compute
18-
the fastest way to keep the UI up-to-date when the data changes.
19+
React computes the minimal set of changes necessary to keep your DOM
20+
up-to-date.
1921
</p>
2022
</div>
2123
<div class="marketing-col">
@@ -33,21 +35,21 @@ id: home
3335
<h3>A Simple Component</h3>
3436
<p>
3537
React components implement a `render()` method that takes input data and
36-
returns what to display. This example constructs the component using an
37-
XML-like syntax called JSX, but <strong>JSX is optional; you don&apos;t
38-
need to use it</strong>. Input data is passed to the component as XML
39-
attributes, and `render()` accesses this data via `this.props`.
38+
returns what to display. This example uses an XML-like syntax called
39+
JSX. Input data that is passed into the component can be accessed by
40+
`render()` via `this.props`.<br />
41+
<strong>JSX is optional and not required to use React.</strong>
4042
</p>
4143
<div id="helloExample"></div>
4244
</div>
4345
<div class="example">
4446
<h3>A Stateful Component</h3>
4547
<p>
46-
In addition to taking data from its creator (accessed via `this.props`),
47-
a component can maintain internal state data (accessed via
48-
`this.state`). When a component's state data changes, the rendered
49-
markup will be updated by re-invoking `render()`. <strong>This example
50-
doesn&apos;t use JSX</strong>, but you could if you wanted to.
48+
In addition to taking input data (accessed via `this.props`), a
49+
component can maintain internal state data (accessed via `this.state`).
50+
When a component's state data changes, the rendered markup will be
51+
updated by re-invoking `render()`.<br />
52+
<strong>This example demonstrates use of React without JSX.</strong>
5153
</p>
5254
<div id="timerExample"></div>
5355
</div>

0 commit comments

Comments
 (0)