Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 749 Bytes

v2.0.0.md

File metadata and controls

21 lines (16 loc) · 749 Bytes

v2.0.0 Migration Guide

This version removes the dependency on redux-thunk in favor of using custom middleware.

The only breaking change in this version is that your store must be initialized using the new redux-flash middleware:

import { applyMiddleware, createStore, combineReducers } from 'redux'
import {
    reducer as flashReducer,
+   middleware as flashMiddleware,
    flashMessage,
    getFlashMessages,
} from 'redux-flash'
- import thunkMiddleware from 'redux-thunk'

const reducer = combineReducers({ flash: flashReducer })

- const store = createStore(reducer, {}, applyMiddleware(thunkMiddleware))
+ const store = createStore(reducer, {}, applyMiddleware(flashMiddleware()))