Add "Short-circuit evaluation" and change "Conditionals"

This commit is contained in:
Daniel Pintilei 2017-10-25 16:41:21 +03:00 committed by GitHub
parent ac4be6a329
commit 1dd121bd42
1 changed files with 11 additions and 3 deletions

View File

@ -379,9 +379,17 @@ Always supply a `key` property.
```jsx
<div>
{showPopup
? <Popup />
: null}
{showMyComponent
? <MyComponent />
: <OtherComponent />}
</div>
```
### Short-circuit evaluation
```jsx
<div>
{showPopup && <Popup />}
</div>
```