-
-
Save arvitaly/b3335f415d14c0bdcb9fa036035ad424 to your computer and use it in GitHub Desktop.
Не происходит асинхронная подписка на ячейку cellx?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cellx = require('cellx'); | |
var a = cellx(55); | |
var x = cellx((push) => { | |
//a() //Если раскомментировать эту строку, то x начинает пересчитываться! | |
setTimeout(() => { | |
push("test" + a()); | |
}, 100) | |
}) | |
x('addChangeListener', () => { | |
console.log("addChangeListener, x:: ", x()); | |
}) | |
console.log("starting value of x:: ", x()); | |
setTimeout(() => { | |
console.log("Change a"); | |
a(66); | |
setTimeout(() => { | |
console.log("After `a` change, x:: ", x()) | |
}, 200) | |
}, 200) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment