Q. Which method is used to change the state in a React class component?

  • (A) this.setChange()
  • (B) this.changeState()
  • (C) this.setState()
  • (D) this.updateState()
πŸ’¬ Discuss
βœ… Correct Answer: (C) this.setState()
Explanation: this.setState() is used to update the state in class components.
Explanation by: Mr. Dubey
this.setState() is used to update the state in class components.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
51
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
80%
Success Rate