HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
reduxjs
redux-toolkit
TypeScript2018–2023
reduxjs / redux-toolkit

redux-toolkit

The official, opinionated, batteries-included toolset for efficient Redux development

8Distinct people
55Mentions
1Explicit recommenders
11.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The official, opinionated, batteries-included toolset for efficient Redux development

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

I've been using redux toolkit's OpenAPI code generator for a side project and it's been pretty good. The documentation is a bit lacking and it could certainly use more work to…

SCUSKU used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 12:56:33 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year55 dated mentions

Observed mentions: 2018-04-11 15:51:39 UTC to 2023-12-04 14:33:19 UTC.

051015202018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 18 mentions; 2 submissions, 16 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 8 mentions; 1 submissions, 7 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 10 mentions; 1 submissions, 9 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 8 mentions; 1 submissions, 7 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC18216
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC707
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC817
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC1019
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC817
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC413

What Hacker News says

10 sources
We've been trying to generally discourage Redux users from using sagas in most cases. I've always felt that they were absolutely overkill for basic data fetching scenarios, and this is even more true now that data fetching libraries like RTK Query and React Query exist. Where sagas _do_ still make sense is highly complex async workflows, including responding to dispatched actions, "background thread"-type behavior, and lots of debouncing/throttling/etc. But yes, I've heard of plenty of cases where sagas made a codebase unreadable, and it's a shame that they get so heavily pushed by some early Redux users. FWIW, I've actually been working on designing a new "action listener middleware" that we'd like to ship in an upcoming version of Redux Toolkit. It started off as very simple callbacks, but by adding a few key primitive functions like
Read the rest
`take`, `condition`, and `delay` I think we've been able to to come up with something that can handle maybe 75% of what sagas can do with a much smaller API surface and bundle size. I'd love to have you or anyone else using Redux take a look and give us some feedback on the current API design and let us know if there's other use cases it ought to cover: https://github.com/reduxjs/redux-toolkit/discussions/1648
In From Node to Ruby on Rails
Yes, absolutely, 100%. I wrote a post a couple years ago describing my journey learning and using TS, with a set of takeaways at the end: https://blog.isquaredsoftware.com/2019/11/blogged-answers-le... I said then that "I refuse to write any more app code that isn't TS", and that's even more true today. TS is not perfect. It does add overhead. But, it adds a huge amount of value and safety to your app. The goal is to use it pragmatically, such that Value > Overhead. *edit* I'll add a bit of additional context here based on my experiences since then. Typing application code is usually relatively straightforward. I'll use React and Redux as an example, because that's A) what I use at work, and B) I maintain Redux. Per our Redux TS Quick Start page [0], you'd start with a few lines to infer the TS types of `RootState` and `AppDispatch` fro
Read the rest
m the store, and create pre-typed React-Redux hooks (which are _much_ easier to type than the legacy `connect` API) to save from repeating those types in components. For each slice reducer, you'd add a TS type for the slice's state, and declare the type of each action's contents as `action: PayloadAction<string>`, etc. For React components, add a type declaration for the props of each component, and add types to function arguments as necessary (change handlers, etc). The React TypeScript CheatSheet [1] is a fantastic resource for learning how to use TS + React together. Also be sure to type any data coming into the system, such as API responses, and any other "business logic" you might have. Those should get you 80%-ish types coverage without too much effort, and all you really need to know is how to declare types for objects+primitives, and a few bits from the React and Redux lib types. I also strongly disagree with many of the "recommended" TS-related linting rules, like "always declare a return type for every function". It's not _wrong_ to have those, but in my experience TS works best when you can let the compiler infer as much as possible. I still firmly believe that for _app_ development, it's not worth spending hours and hours arguing with the compiler to come up with a "perfect 100% correct" type definition for more complicated scenarios. If you know that a function takes `TypeA` as an input and returns a `TypeB`, but there's really complex transformations inside and it's really hard to convince the compiler what you're doing is correct, feel free to do whatever `as` casting or `// @ts-ignore` you need to in the middle. Library types, on the other hand, are the opposite case. Library APIs are often highly generic in both the "use case" and "TS types" senses. There, it _is_ worth spending the time to come up with very complex typedefs with tons of generics and conditional types, because those are often needed to make the _end user experience_ a lot easier. Try looking at the types for Redux Toolkit, React-Redux, or Reselect [2] [3] [4] - our types are complex, so _your_ code doesn't have to be. I spent a ton of time just yesterday trying to make improvements to the Reselect types, because as a maintainer I want our users to have a good experience. But for you as an app dev, it should be a lot simpler. The payoff is that you get all the nice benefits of TS: static detection of common errors like typos and mismatched fields, documentation of your data structures, intellisense, confidence in refactoring, less need to write repetitive "is this argument the right type?" logic, and much more. [0] https://redux.js.org/tutorials/typescript-quick-start [1] https://react-typescript-cheatsheet.netlify.app/ [2] https://github.com/reduxjs/redux-toolkit/blob/v1.6.2/package... [3] https://github.com/reduxjs/react-redux/blob/v8.0.0-alpha.1/s... [4] https://github.com/reduxjs/reselect/blob/v4.1.2/src/index.ts...
In Ask HN: Is it worth it to invest in learning TypeScript?
Hi, I'm a Redux maintainer. Note that we have considerably changed the Redux patterns that we teach over the last couple years to make it easier for folks to learn and use Redux. We now teach using our Redux Toolkit package as the default way to write Redux logic [0], and the React-Redux hooks API [1] as the standard way to work with Redux in React components. We recently rewrote our tutorials from scratch [2], and offer an opinionated set of guidelines on how to write Redux code effectively [3], such as "put all Redux logic for one feature in a single file", "use feature folders", and "prefer putting logic in reducers". We also now recommend some TypeScript usage patterns [4] that simplify the amount of types you have to write. Finally, we are about to release a new "RTK Query" data fetching layer that will be in the upcoming RTK 1.6 rel
Read the rest
In Second-guessing the modern web (2020)
Note that we created our official Redux Toolkit package [0] specifically to solve the "boilerplate" concerns. It includes utilities to simplify several common Redux use cases, including store setup, defining reducers, immutable update logic, and even creating entire "slices" of state at once. The "Modern Redux with Redux Toolkit" docs page [1] shows how to migrate from hand-written Redux logic to use RTK's APIs. We've had a ton of very positive feedback from folks who love using RTK, and even from folks who didn't like Redux before. Also, we're currently finalizing a new "RTK Query" API for Redux Toolkit [2] that provides a purpose-built data fetching and caching abstraction layer, which basically eliminates having to write any of your own code to fetch data. That's available now in the RTK 1.6 alphas [3], and we hope to publish that l
Read the rest
In It's time for a data-first front end revolution
Do you have any good examples of this in action and showing configuration? I've been wrestling with this as we work on finalizing the new "RTK Query" APIs for Redux Toolkit. I'd love to have some auto-generated TS API docs embedded in the hand-written Markdown pages. My biggest questions are things like how to present reasonable details on some of our typedefs, which can get insanely complex and readers don't need to see all the internal sub-types. I recently opened up an RTK issue asking for suggestions on TS API ref integration: https://github.com/reduxjs/redux-toolkit/issues/1046
In Docusaurus 2 Beta
I haven't looked at Kea in a while, but I'll toss out some comparisons based on my knowledge of RTK and what I remember about Kea + looking at its docs. Kea's main selling point is that it lets you define self-contained chunks of Redux logic. Initially, this is similar to RTK's `createSlice`, in that you're writing a set of "case reducers" + action creators. However, it also builds in Redux-Saga as a general-purpose side effects approach, and lets you write "listeners" that respond to dispatched actions. (Edit: after re-reading the latest docs, looks like sagas are now an optional plugin, and "listeners" are a sort of super-thunk of some kind.) Where it particularly differs from RTK is in the amount of abstraction included. RTK tries to stay "visibly Redux" [0], and the abstractions are fairly thin - the focus is on simplifying the typ
Read the rest
ical Redux code patterns, without hiding the fact that you're using Redux. Kea is much more heavily abstracted. It does use a number of Redux terms ("actions", "reducers", etc), but the code that you write looks noticeably different than a "typical" Redux app. Also, RTK focuses on thunks as the default async approach, rather than sagas [1] I believe Kea also has some mechanisms for combining together those "logic" chunks in various ways, including doing so dynamically at runtime, and it appears to have some "lifecycle"-type callbacks for handling when those chunks get mounted and unmounted. RTK Query [2], on the other hand, is a purpose-built data-fetching abstraction, most similar to React Query and Apollo. Its only purpose is to fetch data from whatever URL endpoints you've defined, handle the loading state, update the cache with the results, and re-render whatever components care about that data. (Note that RTK Query was originally published as a standalone for development purposes, but we're in the process of merging that back into RTK itself, and have it available in the RTK 1.6 alphas right now [3]). I haven't actually used Kea myself, but it does appear to have some meaningful thought and development put into it. I would still recommend RTK as the default approach for anyone wanting to use Redux (and of course I'm biased there), but Kea has some interesting approaches. [0] https://blog.isquaredsoftware.com/2019/10/redux-starter-kit-... [1] https://blog.isquaredsoftware.com/2020/02/blogged-answers-wh... [2] https://rtk-query-docs.netlify.app [3] https://github.com/reduxjs/redux-toolkit/releases/tag/v1.6.0...
In Kea: Production Ready React State Management
> From what I gather, your ask is to add information about the usage of the toolkit and steer people towards that. Is that correct? If so, I don't mind adding it, but I think the existing information is helpful. Basically, yes. The point is we want people to know that writing object spreads and action constants by hand is _not_ how they're supposed to really write Redux today, and that RTK both exists and is the standard approach for writing Redux logic. Per the "Quick Start/Getting Started" page: the point of that page is not to teach Redux or RTK. It's just the simplest possible example to show what the syntax looks like. _Learning_ this material is why we have the extensive "Essentials" and "Fundamentals" tutorials. Frankly, if having those snippets in the "Getting Started" page is confusing, I'd rather _remove_ those snippets and poi
Read the rest
nt more emphatically over to the tutorials. > you're not really learning Redux, you're learning the abstraction that's built on top of Redux Yes, and that's also the point. RTK _is_ now "Redux". Or rather, it's the form of Redux we want people to learn. Yes, it _is_ a set of abstractions, and some people may find it easier to learn if they understand the underlying principles and techniques first. That's why the "Fundamentals" tutorial exists. But, many other people just want to dive straight into writing working code and see "how to use it". That's why we have the "Essentials" tutorial, and there's been very positive feedback from people who _only_ read the "Essentials" tutorial to start learning Redux. (We've actually considered just replacing the NPM `redux` package with the RTK contents, but concluded that would be too much ecosystem churn: https://github.com/reduxjs/redux/issues/3321 ). It is admittedly hard to split the learning material between our three docs sites: the Redux core docs, the Redux Toolkit docs, and the React-Redux docs. That's why I actually just deleted the tutorials in the RTK site itself recently, and instead now point to the "Essentials" and "Fundamentals" tutorials in the core site instead, so that there's no duplication of tutorial content. (There were several other issues with the RTK tutorials people had complained about anyway - see https://github.com/reduxjs/redux-toolkit/issues/371 ). FWIW, this is a really good discussion and set of feedback, and I appreciate you engaging with me on this :) If you still have concerns about how we're trying to teach Redux and RTK, could you do me a favor and file a new "Discussion" in the Redux core repo, at https://github.com/reduxjs/redux/discussions ? I definitely take concerns over Redux learning flow seriously and am interested in ways we can improve the docs, and this HN thread probably isn't the best place for surfacing the discussion :)
In How to Use Redux to Manage State

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.