UpTest > Web Development > ReactJS Test

Test: ReactJS Test

Question 20: Prev Next Hide answers

What will happen to the state if you click the <div>

constructor() {
   super();
   this.state = {
     status: 'no status'
   };
 }

 handleClick() {
   this.setState({status: 'I am fine!'});
 }
 render() {
   return (
     <div onClick={this.handleClick}>
     click me
     </div>
   );
 }
}
updates the status state to 'I am fine' 
1 votes
syntax error
0 votes
fatal error
0 votes
return false
0 votes
Please login to submit your answer.