Fix error in the markdown (#34990)
Fix error in the markdown closing the code fragment.
This commit is contained in:
committed by
Randell Dawson
parent
e290762005
commit
a22526d17f
@ -3,13 +3,13 @@ title: Use && for a More Concise Conditional
|
|||||||
---
|
---
|
||||||
## Use && for a More Concise Conditional
|
## Use && for a More Concise Conditional
|
||||||
The example given is
|
The example given is
|
||||||
```
|
```jsx
|
||||||
{condition && <p>markup</p>}
|
{condition && <p>markup</p>}
|
||||||
```
|
```
|
||||||
which is demonstrated below using the condition of the this.state.dinnerCooked boolean.
|
which is demonstrated below using the condition of the this.state.dinnerCooked boolean.
|
||||||
If the boolean is true the markup included in the {} with the condition will display, if not it will not display
|
If the boolean is true the markup included in the {} with the condition will display, if not it will not display
|
||||||
|
|
||||||
```
|
```jsx
|
||||||
class MyComponent extends React.Component {
|
class MyComponent extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -25,6 +25,7 @@ class MyComponent extends React.Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
```
|
||||||
|
|
||||||
## Hint:
|
## Hint:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user