Skip to content

Simplify

Choose a tag to compare

@curran curran released this 24 Feb 05:30
· 43 commits to master since this release

The implementation is simplified and you can no longer access the context object as this in listeners.

my.x.on(function(value){
  console.log(this === my); // Prints "false"
});

With this change, the example code for having reactive properties on an object with method chaining becomes much nicer.

Before this release:

var my = {};
my.x = ReactiveProperty(5, my);
my.y = ReactiveProperty(10, my);
my.x(50).y(100);

After this release:

var my = {
  x: ReactiveProperty(5),
  y: ReactiveProperty(10)
};
my.x(50).y(100);