deprecate store.onchange

pull/1344/head
Rich Harris 7 years ago
parent 2a43fe94b3
commit 20b940a73a

@ -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