mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #2443 from kruppel/kurt/minor-tip-typo
Fix typo in If/Else JSX doc.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user