mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
20 lines
656 B
TypeScript
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
|