so I have put the condition as this.state.display but and when it is false it should return the code without the h1 tag but it doesnt. i tried putting the code inside a return() but that causes errors
**Your code so far**
```jsx
class MyComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
display: true
}
this.toggleDisplay = this.toggleDisplay.bind(this);
}
toggleDisplay() {
this.setState(state => ({
display: !state.display
}));
}
render() {
// change code below this line
{this.state.display == false && <div>
<button onClick={this.toggleDisplay}>Toggle Display</button>
</div>}
return (
<div>
<button onClick={this.toggleDisplay}>Toggle Display</button>
<h1>Displayed!</h1>
</div>
);
}
};
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
.
Challenge: Use && for a More Concise Conditional
Link to the challenge:
https://www.freecodecamp.org/learn/front-end-libraries/react/use--for-a-more-concise-conditional