I am working in react. I want to clear my interval on componentWillUnmount
The interval is set as this
setInterval( () => this.baz(), 1000 );
Following this answer here Referencing "this" inside setInterval/setTimeout within object prototype methods
How do I clear that. I am sorry if this is a basic question