deprecate store.onchange

pull/7738/head
Rich Harris 8 years ago
parent 526a7799ec
commit eeb0e18a94

@ -118,6 +118,8 @@ assign(Store.prototype, {
onchange: function(callback) {
// TODO remove this method
console.warn("store.onchange is deprecated in favour of store.on('state', event => {...})");
return this.on('state', function(event) {
callback(event.current, event.changed);
});

Loading…
Cancel
Save