Projekt

Obecné

Profil

Stáhnout (552 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1 c7d2ced1 Václav Honzík
2
import { combineReducers, createStore } from 'redux'
3 a69da1e3 Vaclav Honzik
import { persistStore } from 'redux-persist'
4
import userReducer from '../Auth/userReducer'
5 c7d2ced1 Václav Honzík
import themeReducer from '../Theme/themeReducer'
6
7 a69da1e3 Vaclav Honzik
// Store holds shared state in the application
8 c7d2ced1 Václav Honzík
const store = createStore(
9 a69da1e3 Vaclav Honzik
    combineReducers({ user: userReducer, theme: themeReducer }),
10 c7d2ced1 Václav Honzík
    {}
11
)
12
13
export default store
14 a69da1e3 Vaclav Honzik
export const persistor = persistStore(store)
15 c7d2ced1 Václav Honzík
export type AppStore = typeof store
16
export type RootState = ReturnType<typeof store.getState>
17
export type AppDispatch = typeof store.dispatch