Skip to content

Commit

Permalink
Fix typo in If/Else JSX doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
kruppel committed Oct 31, 2014
1 parent 881c9b5 commit 4b3b32e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/tips/03-if-else-in-JSX.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This means that `if` statements don't fit in. Take this example:
<div id={if (condition) { 'msg' }}>Hello World!</div>

// Is transformed to this JS:
React.createElement("dov", {id: if (condition) { 'msg' }}, "Hello World!");
React.createElement("div", {id: if (condition) { 'msg' }}, "Hello World!");
```

That's not valid JS. You probably want to make use of a ternary expression:
Expand Down

0 comments on commit 4b3b32e

Please sign in to comment.