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

formatting and syntax on false in JSX tip

Paul O’Shannessy committed Nov 12, 2013 at 13:18 UTC c8218871602eda48b7788e3d55733e581829357d
1 file changed +4 -1
docs/tips/13-false-in-jsx.md
+4 -1
@@ -9,21 +9,24 @@ prev: initial-ajax.html
9 Here's how `false` renders in different contexts:
10
11 Renders as `id="false"`:
12 +
13 ```js
14 /** @jsx React.DOM */
15 React.renderComponent(<div id={false} />, mountNode);
16 ```
17
18 String "false" as input value:
19 +
20 ```js
21 /** @jsx React.DOM */
22 React.renderComponent(<input value={false} />, mountNode);
23 ```
24
25 No child:
26 +
27 ```js
28 /** @jsx React.DOM */
29 React.renderComponent(<div>{false}</div>, mountNode);
30 ```
31
29 -The reason why this one doesn't render as the string `"false"` as a `div` child is to allow the more common use-case: `<div>{x > 1 && You have more than one item}</div>`.
32 +The reason why this one doesn't render as the string `"false"` as a `div` child is to allow the more common use-case: `<div>{x > 1 && 'You have more than one item'}</div>`.