@samitouri / QOS-React-2 / commits / 119e29ff1d

one single child in ternary

Cheng Lou committed Oct 7, 2013 at 23:35 UTC 119e29ff1de11498f907d3610d4105db68cce3b9
2 files changed +2 -2
docs/cookbook/cb-05-jsx-root-node-count tip.md
+1 -1
@@ -7,4 +7,4 @@ permalink: jsx-root-node-count-tip.html
7
8 Currently, in a component's `render`, you can only return one node; if you have, say, a list of `div`s to return, you must wrap your components within a `div`, `span` or any other component.
9
10 -Don't forget that JSX compiles into regular js; returning two functions doesn't really make syntactic sense.
10 +Don't forget that JSX compiles into regular js; returning two functions doesn't really make syntactic sense. Likewise, don't put more than one child in a ternary.
docs/cookbook/cb-05-jsx-root-node-count.md
+1 -1
@@ -12,4 +12,4 @@ You're getting a parsing error from JSX.
12 You might have tried to return more than one node in your component's `render`. Currently, you can only return one node, meaning that you must wrap your components within, say, a `div` or a `span` (or any other component).
13
14 ### Discussion
15 -Don't forget that JSX compiles into regular js; returning two functions doesn't really make syntactic sense.
15 +Don't forget that JSX compiles into regular js; returning two functions doesn't really make syntactic sense. Likewise, don't put more than one child in a ternary.