Q. Which React method is used to update the UI when state changes in class components?
β
Correct Answer: (B)
setState()
Explanation: setState() updates the state and triggers a re-render in class components.