this.setState is not a function – ReactJS

So I’m quite the React Beginner and I’m having the error “this.setState is not a function”.
I’ve tried binding my function, startInterval, but that hasn’t worked.
I’ve tried add ‘this’ to my calling of the function and that hasn’t worked either. I’ve tried everything I’ve seen so far but to no success.

Any help would be appriciated!

export class Timer extends React.Component {
    constructor(props) {
        super(props)
        this.state = { 
            timeS: 0,
            timeM: 0
        }
        this.startInterval = this.startInterval.bind(this);
    }

    startInterval = () => {
        // Set Target Time in miliseconds
        let targetTime = this.props.timeM * 60000 + this.props.timeS *1000; 
        // Move timer each second
        let elapsedTime = 0
        this.intervalID = setInterval(function() {
            let currentTime = targetTime - elapsedTime;
            this.setState({timeM: Math.floor(currentTime/60000), timeS: Math.floor(currentTime/1000)});
            elapsedTime = elapsedTime + 1000;
        }, 1000)
    }
}