Redux Thunk

Thunk middleware that lets Redux action creators return functions instead of plain objects

Library
npm
v3.1.0
17,679stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
46/100Fair
Development Activity0
Maintenance20
Community64
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
83/100Excellent
Architecture80
Code Quality88
Innovation70
Learning Curve95

Redux Thunk is the canonical middleware for writing asynchronous and conditional logic in Redux applications. Instead of dispatching only plain action objects, it lets action creators return a function (a “thunk”) that receives dispatch, getState, and an optional injected extra argument, enabling API calls, delayed dispatches, and conditional dispatch logic to live alongside the rest of an app’s Redux code.

Maintained by the Redux core team, it ships as a single small middleware factory with full TypeScript support and is included by default in Redux Toolkit’s configureStore. Its minimal surface area — one function, one composition pattern — has made it the default recommendation for basic async side effects in Redux, with more complex flows typically graduating to Redux Saga or RTK Query only when needed.

What You Get

  • A thunk middleware export that intercepts function-type dispatches and invokes them with dispatch, getState, and an extra argument
  • A withExtraArgument() factory for injecting a custom dependency (e.g. an API client) into every thunk
  • Full TypeScript types for ThunkAction, ThunkDispatch, and ThunkMiddleware generics
  • Zero runtime dependencies beyond Redux itself
  • Automatic inclusion in Redux Toolkit’s configureStore default middleware

Common Use Cases

  • Dispatching an async action creator that performs an API call and dispatches success/failure actions
  • Conditionally dispatching an action only if certain state conditions are met
  • Injecting a mockable API service as an extra argument for easier testing of async logic
  • Composing multiple async action creators together via returned Promises for sequential control flow

Under The Hood

Architecture - The entire library is a single higher-order function (createThunkMiddleware) in src/index.ts that returns standard Redux middleware: it checks whether the dispatched action is a function, and if so calls it with (dispatch, getState, extraArgument) instead of forwarding it down the middleware chain, otherwise passing plain actions through untouched. Tech Stack - Written in TypeScript, built to dual CJS/ESM output (dist/cjs, dist/redux-thunk.mjs) via a Rollup-based build, with redux as the only peer dependency and no runtime dependencies of its own. Code Quality - Tests run via Vitest with --typecheck enabled so type-level behavior is verified alongside runtime behavior, plus ESLint and Prettier enforced through lint/format:check scripts gating prepublishOnly. API Design - The API is deliberately minimal — one named export (thunk) for the common case and one factory (withExtraArgument) for the customized case — which keeps the learning curve very low and the composition pattern (return a function, get dispatch/getState) trivial to teach.

Used by 19 apps in this directory

TypeScript
72%
AGPL 3.0

APITable

Low Code Platforms · Databases

15,526

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
53
Repo Health
77
Technical
60
Dependency
Built with
TypeScript72%
Java22%
Updated 9 months ago
TypeScript
97%
AGPL 3.0

Bigcapital

Invoicing Finance

3,846

Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.

View details
91
Repo Health
77
Technical
64
Dependency
Built with
TypeScript97%
Updated yesterday
JavaScript
99%
Other

ChartBrew

Analytics · Databases

4,041

Open-source reporting platform to build live dashboards from SQL, NoSQL, APIs, and SaaS tools with an AI assistant that creates charts from natural language.

View details
90
Repo Health
83
Technical
65
Dependency
Built with
JavaScript99%
Updated 6 days ago
TypeScript
53%
Other

Chaskiq

CRM · Customer Support

3,560

Self-hosted live chat, video calls, help center, and marketing automation — a full-stack Intercom alternative you run on your own infrastructure.

View details
60
Repo Health
66
Technical
68
Dependency
Built with
TypeScript53%
Ruby36%
Updated 1 months ago
Java
48%
Apache 2.0

ClearFlask

Product Management · Community

448

Open-source feedback management and roadmap tool that lets product teams collect, prioritize, and respond to user input — with AI-powered summarization and full self-hosting control.

View details
83
Repo Health
73
Technical
63
Dependency
Built with
Java48%
TypeScript47%
Updated 2 weeks ago
TypeScript
84%
Apache 2.0

Continue

Developer Tools · AI Development · AI Code Assistants

35,532

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
87
Repo Health
88
Technical
65
Dependency
Built with
TypeScript84%
Updated today
TypeScript
91%
MIT

GB Studio

Developer Tools · Game Development · Design Tools

9,372

Drag-and-drop retro Game Boy game creator that compiles real ROMs — no coding required.

View details
89
Repo Health
83
Technical
80
Dependency
Built with
TypeScript91%
Updated today
TypeScript
48%
AGPL 3.0

Grafana

Monitoring · Analytics

76,300

The open-source observability platform that unifies metrics, logs, and traces from any data source into dynamic, queryable dashboards.

View details
95
Repo Health
91
Technical
65
Dependency
Built with
TypeScript48%
Go46%
Updated today
TypeScript
74%
Apache 2.0

Jitsi Meet

Team Chat · Collaboration · Video Conferencing

29,767

Open-source, end-to-end encrypted video conferencing you can self-host or embed into any web or mobile app.

View details
96
Repo Health
85
Technical
70
Dependency
Built with
TypeScript74%
JavaScript10%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search