probable onValueChanged leak with ux:Property

Hey, following a short chat with @duckers, tried to reproduce what seems to me like a probable leak when using ux:Property. It may very well be a display of bad practice on my part, but worth a shot anyway.


Launched local preview on OSX + pre-release Fuse

Step to reproduce:

  1. Click “Switch page” five times

  2. Make a change to SomeItem.js file (add a newline somewhere) and save it

  3. Watch Monitor spit out the following:

    LOG: null
    LOG: 0
    LOG: page got param: {"i":0}
    LOG: 1
    LOG: 1
    LOG: page got param: {"i":1}
    LOG: 2
    LOG: page got param: {"i":2}
    LOG: 3
    LOG: page got param: {"i":3}
    LOG: 4
    LOG: page got param: {"i":4}
    LOG: 5
    LOG: 4
    LOG: 5
    LOG: 4
    LOG: 4
    LOG: 5
    LOG: 5

What seems weird is that the this.Label.onValueChanged() from SomeItem.js seems to be firing several times in a row, with different values.


We’ve done a lot of cleanup around this. Keep an eye on the changelog in upcoming releases.

Ideally, we recommend using reactive operators instead of onValueChanged. If you need to do async operations, you can do this:

var foo = {

    var res = Observable();

    somethingAsync().then(function(result) {
        res.value = result;

    return res;