aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/index.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-10-28 00:14:01 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:58 +0300
commit40d411e516efee5531404725b45ab89d97172ce8 (patch)
treed675e93fc52ef50a40343219e1b992867964d3bf /vnext/src/index.js
parent2146a98bd98b7e275a0ee7bc7a243981b597f34c (diff)
Initial SSR
Diffstat (limited to 'vnext/src/index.js')
-rw-r--r--vnext/src/index.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/vnext/src/index.js b/vnext/src/index.js
index be2dfeb1..9f9fa4a3 100644
--- a/vnext/src/index.js
+++ b/vnext/src/index.js
@@ -1,7 +1,6 @@
import { StrictMode, lazy, Suspense } from 'react';
-import ReactDOM from 'react-dom';
-import { BrowserRouter } from "react-router-dom";
-import { CompatRouter } from "react-router-dom-v5-compat";
+import { hydrateRoot } from 'react-dom/client';
+import { BrowserRouter } from 'react-router-dom';
import { CookiesProvider } from 'react-cookie';
import './index.css';
@@ -21,13 +20,11 @@ const JuickApp = () => (
<Suspense fallback={LoadingView()}>
<CookiesProvider>
<BrowserRouter>
- <CompatRouter>
- <Juick />
- </CompatRouter>
+ <Juick />
</BrowserRouter>
</CookiesProvider>
</Suspense>
</StrictMode>
);
-ReactDOM.hydrate(<JuickApp />, document.getElementById('app'));
+hydrateRoot(document.getElementById('app'), <JuickApp />);