-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclient.js
More file actions
19 lines (19 loc) · 718 Bytes
/
client.js
File metadata and controls
19 lines (19 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import React from 'react'
import { hydrateRoot } from 'react-dom/client'
import { Provider } from 'react-redux'
import { applyMiddleware, legacy_createStore as createStore } from 'redux'
import thunk from 'redux-thunk'
import routes from './routes';
import reducers from './src/state/reducers/index'
import { BrowserRouter } from 'react-router-dom'
import App from './src/components/App'
import { renderRoutes } from 'react-router-config'
const store=createStore(reducers, window.__preLoadedState__, applyMiddleware(thunk))
delete window.__preLoadedState__
hydrateRoot(document.getElementById('root'),
<Provider store={store}>
<BrowserRouter>
<App />
</BrowserRouter>
</Provider>
)