@samitouri / QOS-React-2 / commits / eb118b7037

Update react-without-jsx.md

Facebook codestyle

Christopher Chedeau committed Oct 21, 2016 at 14:30 UTC eb118b70379ff01b30bb04dfce2c685c26d5453d
1 file changed +8 -4
docs/docs/react-without-jsx.md
+8 -4
@@ -32,8 +32,10 @@ class Hello extends React.Component {
32 }
33 }
34
35 -ReactDOM.render(React.createElement(Hello, {toWhat: 'World'}, null),
36 - document.getElementById('root'));
35 +ReactDOM.render(
36 + React.createElement(Hello, {toWhat: 'World'}, null),
37 + document.getElementById('root')
38 +);
39 ```
40
41 If you're curious to see more examples of how JSX is converted to JavaScript, you can try out [the online Babel compiler](https://babeljs.io/repl/#?babili=false&evaluate=true&lineWrap=false&presets=es2015%2Creact%2Cstage-0&code=function%20hello()%20%7B%0A%20%20return%20%3Cdiv%3EHello%20world!%3C%2Fdiv%3E%3B%0A%7D).
@@ -45,8 +47,10 @@ If you get tired of typing `React.createElement` so much, one common pattern is
47 ```js
48 var e = React.createElement;
49
48 -ReactDOM.render(e('div', null, 'Hello World'),
49 - document.getElementById('root'));
50 +ReactDOM.render(
51 + e('div', null, 'Hello World'),
52 + document.getElementById('root')
53 +);
54 ```
55
56 If you use this shorthand form for `React.createElement`, it can be almost as convenient to use React without JSX.