# reduxjs/redux-thunk

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/reduxjs-redux-thunk).**

17,695 stars · 1,019 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/reduxjs/redux-thunk
- awesome-repositories: https://awesome-repositories.com/repository/reduxjs-redux-thunk.md

## Description

redux-thunk is a middleware for Redux that enables action creators to return functions instead of objects. This allows the store to handle asynchronous side effects and manage complex workflows and delayed state updates.

The middleware acts as a side effect orchestrator that intercepts dispatched functions to execute asynchronous logic, such as API calls. It also functions as a dependency injection layer, allowing external services or mock objects to be passed into action creators to improve modularity and testability.

The project provides capabilities for orchestrating control flow and coordinating multiple asynchronous tasks. This includes the use of promises to chain state transitions and synchronize parallel execution within a centralized store.

## Tags

### Software Engineering & Architecture

- [Asynchronous Action Handlers](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/state-logic-and-utilities/asynchronous-action-handlers.md) — Intercepts action creators that return functions to perform asynchronous logic or side effects before dispatching final actions. ([source](https://github.com/reduxjs/redux-thunk/blob/master/.gitattributes))
- [Action Interceptors](https://awesome-repositories.com/f/software-engineering-architecture/action-based-state-transitions/action-interceptors.md) — Provides the primary mechanism to intercept dispatched functions and execute custom logic before updating the store state.
- [Higher-Order Function Wrapping](https://awesome-repositories.com/f/software-engineering-architecture/higher-order-function-wrapping.md) — Wraps action creators to return functions, allowing delayed execution and access to store dispatch.
- [Dispatch Wrappers](https://awesome-repositories.com/f/software-engineering-architecture/higher-order-function-wrapping/dispatch-wrappers.md) — Wraps the store dispatch method to enable the execution of asynchronous functions and side effects.

### Web Development

- [Side Effect Management Libraries](https://awesome-repositories.com/f/web-development/side-effect-management-libraries.md) — Provides a library for managing asynchronous side effects and complex workflows within a Redux state container. ([source](https://github.com/reduxjs/redux-thunk/blob/master/tsup.config.ts))
- [Asynchronous Middleware](https://awesome-repositories.com/f/web-development/asynchronous-middleware.md) — Provides middleware for Redux that allows action creators to return functions to handle asynchronous side effects.

### DevOps & Infrastructure

- [State Workflow Orchestrators](https://awesome-repositories.com/f/devops-infrastructure/cicd-pipeline-automation/workflow-orchestration/state-workflow-orchestrators.md) — Enables the chaining and synchronization of multiple asynchronous tasks using returned promises. ([source](https://github.com/reduxjs/redux-thunk/blob/master/README.md))

### Programming Languages & Runtimes

- [Promise-Based Flow Control](https://awesome-repositories.com/f/programming-languages-runtimes/promise-based-flow-control.md) — Coordinates multiple asynchronous actions by returning values or promises to synchronize completion. ([source](https://github.com/reduxjs/redux-thunk#readme))
- [Promise-Based Chains](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtimes/asynchronous-execution-engines/asynchronous-control-flows/promise-based-flow-control/promise-based-chains.md) — Enables dispatched functions to return promises for chaining and coordinating asynchronous state transitions.

### User Interface & Experience

- [State-Based Workflow Orchestrators](https://awesome-repositories.com/f/user-interface-experience/progress-steps/state-based-workflow-orchestrators.md) — Coordinates multiple asynchronous tasks and conditional state updates by chaining promises within middleware.
