JavaScript React Components Stateful Components and Lifecycle Methods Stateful Components and Lifecycle Methods Review

Complete the code to add the method that will clear the interval ID once the component gets removed from the DOM.

··· () { clearInterval(this.myIntervalID); } ···