class PlayerControls extends React.Component { constructor(props) { super(props) this.state = { loopActive: false, shuffleActive: false, }
I ran into a similar bind in a render function and ended up passing the context of this in the following way:
this
{someList.map(function(listItem) { // your code }, this)}
I've also used:
{someList.map((listItem, index) => )}