Use structural comparer as default for store sync reaction

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala committed 2020-11-19 14:06:44 +02:00
1 parent a53e159f1c
commit ad310cc332
1 file changed
+4 -1
+4 -1
View File
@@ -2,7 +2,7 @@ import path from "path"
import Config from "conf"
import { Options as ConfOptions } from "conf/dist/source/types"
import { app, ipcMain, IpcMainEvent, ipcRenderer, IpcRendererEvent, remote } from "electron"
import { action, IReactionOptions, observable, reaction, runInAction, toJS, when } from "mobx";
import { action, comparer, IReactionOptions, observable, reaction, runInAction, toJS, when } from "mobx";
import Singleton from "./utils/singleton";
import { getAppVersion } from "./utils/app-version";
import logger from "../main/logger";
@@ -28,6 +28,9 @@ export class BaseStore<T = any> extends Singleton {
this.params = {
autoLoad: false,
syncEnabled: true,
syncOptions: {
equals: comparer.structural,
},
...params,
}
this.init();