Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 37f6ff02

Přidáno uživatelem Václav Honzík před téměř 3 roky(ů)

re #9368 - redux slice for auth + axios interceptors start

Zobrazit rozdíly:

frontend/src/features/redux/store.ts
1 1

  
2
import { combineReducers, createStore } from 'redux'
2
import { applyMiddleware, combineReducers, createStore } from 'redux'
3 3
import { persistStore } from 'redux-persist'
4
import thunk from 'redux-thunk'
4 5
import userReducer from '../Auth/userReducer'
5 6
import themeReducer from '../Theme/themeReducer'
6 7

  
7 8
// Store holds shared state in the application
8 9
const store = createStore(
9 10
    combineReducers({ user: userReducer, theme: themeReducer }),
10
    {}
11
    applyMiddleware(thunk) // Thunk middleware so we can async fetch data from the api
11 12
)
12 13

  
13 14
export default store

Také k dispozici: Unified diff