Q. Which method is used to update state in a class component?

  • (A) this.state
  • (B) setState
  • (C) updateState
  • (D) changeState
πŸ’¬ Discuss
βœ… Correct Answer: (B) setState
Explanation: In class components, state is updated using the setState method.
Explanation by: Mr. Dubey
In class components, state is updated using the setState method.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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