redux-thunk#ThunkMiddleware TypeScript Examples

The following examples show how to use redux-thunk#ThunkMiddleware. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: configureStore.ts    From atorch-console with MIT License 6 votes vote down vote up
configureStore = () =>
  createStore(
    createRootReducer(history),
    undefined,
    composeEnhancers(
      applyMiddleware(
        routerMiddleware(history), // connected-react-router
        thunk as ThunkMiddleware<RootState>, // redux-thunk
      ),
    ),
  )
Example #2
Source File: configureStore.ts    From mops-vida-pm-watchdog with MIT License 6 votes vote down vote up
configureStore = () =>
  createStore(
    createRootReducer(history),
    undefined,
    composeEnhancers(
      applyMiddleware(
        routerMiddleware(history), // connected-react-router
        thunk as ThunkMiddleware<RootState>, // redux-thunk
      ),
    ),
  )