Skip to content

Commit 83a21e0

Browse files
authored
NETOBSERV-1450: use isolated states for mobx (#450)
1 parent 0fdc43c commit 83a21e0

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

web/package-lock.json

Lines changed: 15 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
"jsdom": "19.0.0",
7171
"jsdom-global": "3.0.2",
7272
"mini-css-extract-plugin": "^2.6.0",
73+
"mobx": "^5.15.7",
7374
"prettier": "^2.5.1",
7475
"pretty-quick": "^3.1.2",
7576
"react-transition-group": "^4.4.2",

web/src/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
43
import i18n from 'i18next';
54
import httpBackend from 'i18next-http-backend';
65
import { initReactI18next } from 'react-i18next';
6+
import { configure } from 'mobx';
77

88
import '@patternfly/patternfly/patternfly-charts-theme-dark.css';
99
import '@patternfly/patternfly/patternfly-theme-dark.css';
@@ -13,6 +13,8 @@ import App from './app';
1313
import { getLanguage } from './utils/language';
1414
import './index.css';
1515

16+
configure({ isolateGlobalState: true });
17+
1618
//init standalone i18n translations
1719
i18n
1820
// fetch json files

0 commit comments

Comments
 (0)