Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/le0pard/pgtune.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Vasiliev <leopard.not.a@gmail.com>2022-04-14 12:37:16 +0300
committerAlexey Vasiliev <leopard.not.a@gmail.com>2022-04-14 12:37:16 +0300
commitd4ce2eea15be039dab6e6a451f9e6ecbac01f9b6 (patch)
tree11d721dff0652c58f9e541ce228577eaaa035cdb
parent1a3e5c5ae8e53687d561ec81538bf7503c339ca8 (diff)
update
-rw-r--r--assets/app.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/assets/app.js b/assets/app.js
index 8dacc85..6548f8c 100644
--- a/assets/app.js
+++ b/assets/app.js
@@ -7,9 +7,10 @@ import LocalStorage from 'lib/localStorage'
import {initializeStore} from './redux/store'
import {initServiceWorker} from './swWindow'
// render app
-const renderApp = (Component, root, store) => {
+const renderApp = (Component, appRoot, store) => {
initServiceWorker(store)
+ const root = createRoot(appRoot)
root.render(
<Component store={store} />
)
@@ -31,6 +32,6 @@ const prepareStoreData = () => {
}
}
// init store and start app
-const appRoot = createRoot(document.getElementById('app-root'))
+const appRoot = document.getElementById('app-root')
const store = initializeStore(prepareStoreData())
renderApp(Root, appRoot, store)