why do we use redux thunk in store code example
Example: store with redux-thunk
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
const store = createStore(
rootReducer,
applyMiddleware(thunk)
);
/*** remember to install redux-thunk: */
npm i redux-thunk --save-dev