5/7 Call this.setState from Another Function Part 4


#1

Not sure where I went wrong, but a push in the right direction would be appreciated. Thanks.

https://www.codecademy.com/en/courses/react-101/lessons/this-state/exercises/call-setstate-another-function?action=lesson_resume&link_content_target=interstitial_lesson

changeColor: function () {
    var changeColor = this.state.color == yellow ? green : yellow;
    this.changeColor({ color: yellow });
  },

#2

hint: you left out the setState method


#3

Wow, the one little thing I overlooked. Thanks @npup04


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.