You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,15 +72,15 @@ ReactDOM.render(
72
72
);
73
73
```
74
74
75
-
Attention, you have to use `<script type="text/babel">` to indicate JSX codes, and include `browser.min.js`, which is a [browser version](https://babeljs.io/docs/usage/browser/) of Babel and could be get inside a [babel-core](https://www.npmjs.com/package/babel-core) npm release, to actually perform the transformation in the browser.
75
+
Attention, you have to use `<script type="text/babel">` to indicate JSX codes, and include `browser.min.js`, which is a [browser version](https://babeljs.io/docs/usage/browser/) of Babel and could be get inside a [babel-core@5](https://www.npmjs.com/package/babel-core) npm release, to actually perform the transformation in the browser.
76
76
77
77
Before v0.14, React use `JSTransform.js` to translate `<script type="text/jsx">`. It has been deprecated ([more info](https://facebook.github.io/react/blog/2015/06/12/deprecating-jstransform-and-react-tools.html)).
You could also use JavaScript in JSX. It takes angle brackets (<) as the beginning of HTML syntax, and curly brackets ({) as the beginning of JavaScript syntax.
83
+
You could also use JavaScript in JSX. It takes angle brackets (<) as the beginning of HTML syntax, and curly brackets (`{`) as the beginning of JavaScript syntax.
84
84
85
85
```js
86
86
var names = ['Alice', 'Emily', 'Kate'];
@@ -186,7 +186,7 @@ ReactDOM.render(
186
186
<span>hello</span>
187
187
<span>world</span>
188
188
</NotesList>,
189
-
document.body
189
+
document.getElementById('example')
190
190
);
191
191
```
192
192
@@ -225,7 +225,7 @@ var data = 123;
225
225
226
226
ReactDOM.render(
227
227
<MyTitle title={data} />,
228
-
document.body
228
+
document.getElementById('example')
229
229
);
230
230
```
231
231
@@ -254,7 +254,7 @@ var MyTitle = React.createClass({
254
254
255
255
ReactDOM.render(
256
256
<MyTitle />,
257
-
document.body
257
+
document.getElementById('example')
258
258
);
259
259
```
260
260
@@ -346,7 +346,7 @@ var Input = React.createClass({
0 commit comments