remove deprecated store.onchange (#168)

This commit is contained in:
Nolan Lawson 2018-04-18 23:48:13 -07:00 committed by GitHub
parent a24177b62a
commit 7f5bea8f5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,7 @@ export class LocalStorageStore extends Store {
}
}
this.set(newState)
this.onchange((state, changed) => {
this.on('state', ({changed}) => {
Object.keys(changed).forEach(change => {
if (this._keysToWatch.has(change)) {
this._keysToSave[change] = true