Can't Find State Inside Object.keys
render() { console.log(this.state.myStateValue); // I see this on the console var test = configOptions ? Object.keys(configOptions).map(function(key) { console
Solution 1:
Try this:
Object.keys(configOptions).map(function(key) {
console.log('test');
console.log(this.state.myStateValue);
}.bind(this))
or better, if you have ES6
:
Object.keys(configOptions).map((key) => {
console.log('test');
console.log(this.state.myStateValue);
})
Post a Comment for "Can't Find State Inside Object.keys"