Projekt

Obecné

Profil

Stáhnout (1.03 KB) Statistiky
| Větev: | Tag: | Revize:
1
import React from 'react'
2
import ReactDOM from 'react-dom'
3
import './index.css'
4
import App from './App'
5
import reportWebVitals from './reportWebVitals'
6
import { BrowserRouter } from 'react-router-dom'
7
import store, { persistor } from './features/redux/store'
8
import { Provider } from 'react-redux'
9
import { injectStore } from './api/api'
10
import { PersistGate } from 'redux-persist/integration/react'
11

    
12
// Injects store to the axios instance in ./api/axiosInstance
13
injectStore(store)
14

    
15
ReactDOM.render(
16
    <Provider store={store}>
17
        <PersistGate loading={null} persistor={persistor}>
18
            <React.StrictMode>
19
                <BrowserRouter>
20
                    <App />
21
                </BrowserRouter>
22
            </React.StrictMode>
23
        </PersistGate>
24
    </Provider>,
25
    document.getElementById('root')
26
)
27

    
28
// If you want to start measuring performance in your app, pass a function
29
// to log results (for example: reportWebVitals(console.log))
30
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
31
reportWebVitals()
(5-5/6)