What missing in my return statement

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

class Results extends React.Component {
constructor(props) {
  super(props);
}
render() {
  {/* Change code below this line */}
  return <h1>{this. props.fiftyFifty ? "You Win!" : "You Lose!"}</h1>;
  {/* Change code above this line */}
}
}

class GameOfChance extends React.Component {
constructor(props) {
  super(props);
  this.state = {
    counter: 1
  };
  this.handleClick = this.handleClick.bind(this);
}
handleClick() {
  this.setState( {
    // Complete the return statement:
    counter: this.state.counter + 1
    
  });
}
render() {
  const expression = Math.random() >= 0.5 ? true : false ; // Change this line
  return (
    <div>
      <button onClick={this.handleClick}>Play Again</button>
      {/* Change code below this line */}
<Result fiftyFifty={expression}/>
      {/* Change code above this line */}
      <p>{'Turn: ' + this.state.counter}</p>
    </div>
  );
}
}
  **Your browser information:**

User Agent is: Mozilla/5.0 (Linux; Android 9; Infinix X626) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36

Challenge: Render Conditionally from Props

Link to the challenge:

There’s small typo in the name of component, it’s: Results

Incorrect component name

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.