Redux middleware
This commit is contained in:
parent
fbf7a5452c
commit
8c3335094a
2 changed files with 31 additions and 3 deletions
|
@ -1,6 +1,12 @@
|
|||
import { createStore } from "redux"
|
||||
import rootReducer from "../reducers/index"
|
||||
import { createStore, applyMiddleware, compose } from 'redux'
|
||||
import rootReducer from '../reducers/index'
|
||||
import { forbiddenWordsMiddleware } from '../middleware'
|
||||
|
||||
const store = createStore(rootReducer)
|
||||
const storeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
|
||||
|
||||
const store = createStore(
|
||||
rootReducer,
|
||||
storeEnhancers(applyMiddleware(forbiddenWordsMiddleware))
|
||||
)
|
||||
|
||||
export default store
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue