[Docs] Reword section on React without JSX
Summary: This section was confusing. I reworded it from: "JSX is completely optional. You don't have to use JSX with React. You can create these trees through `React.createElement`. The first argument is the tag, pass a properties object as the second argument and children to the third argument." to: "JSX is completely optional; you don't have to use JSX with React. You can create React elements in plain JavaScript using `React.createElement`, which takes a tag name or component, a properties object, and variable number of optional child arguments." and additionally added another child element to the example code. Test Plan: Read the new paragraph!
Michelle Todd committed
Feb 16, 2015 at 17:12 UTC
17f2c2613948ecfb94dcd36776b7c912af3a079f
1 file changed
+4
-3
docs/docs/02-displaying-data.md
+4
-3
@@ -100,11 +100,12 @@ The easiest way to get started with JSX is to use the in-browser `JSXTransformer
100
101
## React without JSX
102
103
-JSX is completely optional. You don't have to use JSX with React. You can create these trees through `React.createElement`. The first argument is the tag, pass a properties object as the second argument and children to the third argument.
103
+JSX is completely optional; you don't have to use JSX with React. You can create React elements in plain JavaScript using `React.createElement`, which takes a tag name or component, a properties object, and variable number of optional child arguments.
104
105
```javascript
106
-var child = React.createElement('li', null, 'Text Content');
107
-var root = React.createElement('ul', { className: 'my-list' }, child);
106
+var child1 = React.createElement('li', null, 'First Text Content');
107
+var child2 = React.createElement('li', null, 'Second Text Content');
108
+var root = React.createElement('ul', { className: 'my-list' }, child1, child2);
109
React.render(root, document.body);
110
```
111