1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/common/libs-config.ts
Roman 4fbefb648a replacing toJS({}) to utils/cloneJson where might be necessary
Signed-off-by: Roman <ixrock@gmail.com>
2021-04-23 16:18:35 +03:00

20 lines
656 B
TypeScript

// Global configuration setup for external packages.
// Should be imported at the top of app's entry points.
import * as Mobx from "mobx";
import * as Immer from "immer";
// Docs: https://mobx.js.org/configuration.html
Mobx.configure({
enforceActions: "never",
isolateGlobalState: true,
// TODO: enable later (read more: https://mobx.js.org/migrating-from-4-or-5.html)
// computedRequiresReaction: true,
// reactionRequiresObservable: true,
// observableRequiresReaction: true,
});
// Docs: https://immerjs.github.io/immer/
Immer.setAutoFreeze(false); // allow to merge mobx observables
Immer.enableMapSet(); // allow to merge maps and sets