Context lost problem (closure fix)
by Alex Zolotyh
Babel + JSX
var feedback = {
message: 'Привет!',
send: function() {
alert(this.message); // Алерт для наглядности
}
};
setTimeout(::feedback.send); // Ассинхронный вызов
by Alex Zolotyh
var feedback = {
message: 'Привет!',
send: function() {
alert(this.message); // Алерт для наглядности
}
};
setTimeout(::feedback.send); // Ассинхронный вызов