reselect VS redux-saga

Compare reselect vs redux-saga and see what are their differences.

reselect

Selector library for Redux (by reduxjs)

redux-saga

An alternative side effect model for Redux apps (by redux-saga)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
reselect redux-saga
46 42
18,995 22,506
0.1% 0.0%
9.7 4.4
3 days ago 2 days ago
TypeScript JavaScript
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

reselect

Posts with mentions or reviews of reselect. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-05.
  • Redux Toolkit 2.0: new features, faster perf, smaller bundle sizes (plus major versions for all Redux family packages!)
    7 projects | /r/reactjs | 5 Dec 2023
  • Redux Toolkit 2.0: new features, faster perf, smaller bundle sizes, and more
    6 projects | news.ycombinator.com | 4 Dec 2023
    - Throws better errors in an RSC environment

    - https://github.com/reduxjs/react-redux/releases/tag/v9.0.0

    ## Reselect 5.0:

    - Switches to a new `weakMapMemoize` memoizer as default

    - Renames `defaultMemoize` to `lruMemoize`

    - Allows passing memoizer options direct to `createSelector`

    - Many TS improvements

    - https://github.com/reduxjs/reselect/releases/tag/v5.0.1

    ## Redux Thunk 3.0:

    - Drops the default export and switches to named exports ( `{thunk, withExtraArgument}` )

    - https://github.com/reduxjs/redux-thunk/releases/tag/v3.1.0

    This has been a _huge_ year-long development effort!

    We're thrilled to get these improvements out. The tooling and bundle improvements will help all users, and we think the features and TS changes will improve the Redux dev experience significantly.

    Thank you SO MUCH to everyone who has contributed or helped test out the work!

    Please file bug reports for the inevitable issues that pop up post-release!

    but now I'm going off on a conf trip and going to take a very well-earned break from Redux work for December :)

  • 45 NPM Packages to Solve 16 React Problems
    22 projects | dev.to | 14 Nov 2023
    reselect -> For making faster queries to store.
  • Top 7 Libraries for Blazingly Fast ReactJS Applications
    6 projects | dev.to | 18 Aug 2023
    Reselect solves this problem by memorizing the values and only passing what’s necessary.
  • 20 Essential Parts Of Any Large Scale React App
    15 projects | dev.to | 2 Jun 2023
    reselect : Selector library to optimize your store access
  • Revolutionize Your React App with Redux: A Beginner's Guide to Simplifying State Management(PART 2)
    3 projects | dev.to | 12 Apr 2023
    Reselect documentation:
  • 20 Best Libraries and Tools for React Developers
    11 projects | dev.to | 25 Jan 2023
    Reselect is a library for creating memoized “selector” functions. Commonly used with Redux, to slice state and provide just the necessary subtree to a React component.
  • Please review my 1st react project
    2 projects | /r/reactjs | 14 Dec 2022
    For the redux part, you need to use two hooks. The first one is for sending data and that is useDispatch and for getting data from redux is useSelector. This link will help you a lot. The only that left is Reselect concept. The thing with redux is that when you update one state inside of the redux store the whole thing updates itself so basically it may cause you to re-render your components. Reselect will prevent that but it's a little bit advanced topic whenever you were comfortable enough with redux I suggest you learn to use reselect. Other than these Really good work with the project.😉👍 welcome to the community. 😁
  • Killing mutants to improve your tests
    5 projects | dev.to | 7 Nov 2022
    At my current client we're working on having a frontend architecture for writing SPAs in JavaScript similar to re-frame's one: an event-driven bus with effects and coeffects for state management[1] (commands) and subscriptions using reselect's selectors (queries).
  • TypeScript is terrible for library developers
    16 projects | news.ycombinator.com | 23 Aug 2022
    Heh, it's amusing to see Redux Toolkit referenced here. I'm one of the two main RTK maintainers. My co-maintainer Lenz Weber is responsible for most of our TS type wizardry.

    Agreed that writing TS types for libs can be a pain. I actually did a talk recently on "Lessons Learned Maintaining TS Libraries" [0], where I talked about some of the techniques we used, and some possible TS changes that would be helpful for us as maintainers.

    As one recent example, TS made a change in a 4.8 pre-alpha that broke RTK's `createSlice` types. Lenz tried to come up with a fix, couldn't, and had to add a workaround to check what TS version is being used and specifically use an altered type. Since there _isn't_ a good way to know what TS version is being used, Lenz resorted to hacking together a new package that abuses the `typesVersions` property to define a different TS type for _every_ TS major+minor version combo, and then used that to decide what the RTK type should look like conditionally [1].

    Another pain point is debugging type transformations. I reworked the Reselect types in 4.1.x to do a much better job of inferring the argument types for the final selector, based on the intersection of all the input selector arguments. This ended up as a monstrous type that does a types-level map + transpose + intersection [2]. It took me weeks to get this working right, and I frequently had to break it down into multiple small intermediate types to see how TS was processing each step.

    I know that someone on Twitter was recently working on an alternate TS type-checker based on bytecode, and they said they had some kind of a working types-level debugger [3]. Having something like that officially, where I could see each step of how TS was transforming the types, would be _hugely_ valuable.

    There's a couple folks like AndaristRake who are able to dig into the internals of the TS compiler itself to trace how it's interpreting the types. I definitely don't have that ability :)

    [0] https://blog.isquaredsoftware.com/2022/05/presentations-ts-l...

    [1] https://github.com/reduxjs/redux-toolkit/pull/2547

    [2] https://github.com/reduxjs/reselect/blob/v4.1.5/src/types.ts...

    [3] https://twitter.com/MarcJSchmidt/status/1539787500788613120

redux-saga

Posts with mentions or reviews of redux-saga. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-01-04.
  • Main-Thread-Scheduling
    4 projects | news.ycombinator.com | 4 Jan 2024
  • Creating Own Chat GPT
    9 projects | dev.to | 15 Sep 2023
    For the backend, we chose Python, Django Rest Framework. On the frontend, React, Redux, Saga, Sass. Let’s start with the backend, which was managed by Yegor. He writes about the server part of the project himself.
  • Internals of Async / Await in JavaScript
    5 projects | news.ycombinator.com | 1 Sep 2023
    The whole article properly the best explanation of generators I have come across. This quote stuck out:

    > Generators are a special type of function that can return multiple pieces of data during its execution. Traditional functions can return multiple data by using structures like Arrays and Objects, but Generators return data whenever the caller asks for it, and they pause execution until they are asked to continue to generate and return more data.

    Applications of generators? I have only used Redux-Saga[1]. Can't even think of other libraries that use them, but would be interested in learning.

    [1]: https://redux-saga.js.org/

  • Generators in the wild
    3 projects | dev.to | 6 Aug 2023
    redux-saga. The most popular effects library in js
  • I don't get why I should use Redux
    6 projects | /r/webdev | 9 Mar 2023
    Redux can be extended with a lot of other packages. For example with a side effect manager, you can separate side effects from your business logic, help with error handling and in the same process make testing of side effects a lot easier.
  • What Is The Best Name for This Synchronous Function?
    4 projects | /r/learnjavascript | 3 Feb 2023
    Consumer vs. Producer: Check out Redux Saga
  • Front-end Guide
    54 projects | dev.to | 23 Nov 2022
    Your app will likely have to deal with async calls like making remote API requests. redux-thunk and redux-saga were created to solve those problems. They may take some time to understand as they require understanding of functional programming and generators. Our advice is to deal with it only when you need it.
  • Why Would Anyone Need JavaScript Generator Functions?
    19 projects | news.ycombinator.com | 7 Nov 2022
    Hey thanks for the thoughtful response.

    I agree with everything you mentioned here. I'd love to continue to chat with you about how to make testing sagas better.

    If you'd like, it would be great if we could move this convo to https://github.com/redux-saga/redux-saga/discussions/2337

    19 projects | news.ycombinator.com | 7 Nov 2022
    Redux-sagas[0] makes great use of generators. I found it a fantastic tool, if you're already in the redux ecosystem, and have an application that sprawls enough to benefit. It's great when you have to manage multiple process lifecycles. A single "saga" can represent the entire lifespan of a session in just a few lines of code, a socket or similar long-lived process, with clear code branches to shorter-lived handlers or other sagas for the details.

    The downsides are:

    - a quirky syntax that needs learning, and is of the "loose with semantics" style - like Rails-eque REST's play with HTTP methods

    - it's hard to test (despite what the documentation claims). It's highly declarative, and such code seems hard to test.

    [0] http://redux-saga.js.org/

  • What is the best plan to catch data from multiple api calls and display some data
    2 projects | /r/reactjs | 16 Oct 2022
    If there are dependent API calls, you can probably look at redux-saga. It’s one of the best libraries out there to manage the data.

What are some alternatives?

When comparing reselect and redux-saga you can also consider the following projects:

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

react-query - 🤖 Powerful asynchronous state management, server-state utilities and data fetching for TS/JS, React, Solid, Svelte and Vue. [Moved to: https://github.com/TanStack/query]

rtk-query - Data fetching and caching addon for Redux Toolkit

axios - Promise based HTTP client for the browser and node.js

SWR - React Hooks for Data Fetching

recompose - A React utility belt for function components and higher-order components.

Immer - Create the next immutable state by mutating the current one

use-context-selector - React useContextSelector hook in userland

Next.js - The React Framework

react-redux - Official React bindings for Redux