diff options
| author | Philipp Eichmann <philipp.eichmann@gmail.com> | 2018-12-21 18:45:24 -0500 |
|---|---|---|
| committer | Philipp Eichmann <philipp.eichmann@gmail.com> | 2018-12-21 18:45:24 -0500 |
| commit | 06098b7bdd6a83f6b9cc07d2377f2a19cc0ecaa6 (patch) | |
| tree | d665964243f9949424555175711e27166e96f70e /src/stores/RootStore.ts | |
| parent | 9caa9ca4a0b413e2da03eff4856cb324939d77d4 (diff) | |
added code
Diffstat (limited to 'src/stores/RootStore.ts')
| -rw-r--r-- | src/stores/RootStore.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/stores/RootStore.ts b/src/stores/RootStore.ts new file mode 100644 index 000000000..fa551c1d1 --- /dev/null +++ b/src/stores/RootStore.ts @@ -0,0 +1,16 @@ +import { action, observable } from "mobx"; +import { NodeStore } from "./NodeStore"; + +// This globally accessible store might come in handy, although you may decide that you don't need it. +export class RootStore { + + private constructor() { + // initialization code + } + + private static _instance: RootStore; + + public static get Instance():RootStore { + return this._instance || (this._instance = new this()); + } +}
\ No newline at end of file |
