Question 1 / 1
In the Color Organizer, a developer adds a 'Clear All Ratings' button to the App component. When clicked, it should reset every color's rating to 0. They write:
clearAllRatings() {
this.state.colors.forEach(color => {
color.rating = 0
})
this.setState({ colors: this.state.colors })
}
The button click triggers no visible update. What are the two bugs?