|15 days ago||about 21 hours ago|
|MIT License||MIT License|
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.
The complex React/Redux app that I don't hate
1 project | dev.to | 11 Apr 2022
Each one of those method calls represents a potentially huge tree of nested method calls. And if we've implemented memoization, it would all run in O(n), where n is the total number of methods. There is no performance impact from the nested calls and we're guaranteed to respect all business rules at every level (DRY), while keeping each method easily readable. reselect is a perfectly good library that provides composability and memoization.
Coming from Java, I don’t think I ever understood the phrase “enough rope to shoot yourself in the foot” until I saw some of the super-complicated types people can make in Typescript.
1 project | reddit.com/r/typescript | 7 Apr 2022
But we needed this in Reselect because it has an incredibly variadic JS runtime API. You can pass in any number of input selectors, as either individual function arguments or one big array, and all the rest of the output behavior depends on those. This one giant MergeParameters type is effectively replacing 3300 lines of copy-pasta'd typedefs for 1...12 input selectors.
How to subscribe to a slice of array in redux such that the component subscribed re renders only when the slice changes.
1 project | reddit.com/r/reactjs | 15 Feb 2022
One thing that can help is the new customization options in Reselect 4.1.x. You don't need a deep equal check here. Instead, you could use a shallow check as the resultEqualityCheck option. It would still end up having to re-run the filter statement, because the input array is being changed to a new reference when you do an update to any item in the array. Filtering the array does create a new result array reference. But, resultEqualityCheck: shallowEqual will reuse the previous result as long as the contents of the array are the same, and that will prevent the component from re-rendering.
Testing Redux Selectors with resultFunc
1 project | dev.to | 12 Jan 2022
Over the years, as I've been using Redux, I've tried quite a few different forms of testing. Actions, reducers, sagas, selectors, some with more boiler plate results than others. One of the evolutions of testing that I've enjoyed the most has been with the library I use for selectors, reselect.
What's new in Redux?
3 projects | reddit.com/r/reactjs | 30 Dec 2021
While Reselect has always been a separate library from Redux itself, it's in our Github org. The previous maintainer had to stop working on it, so a couple months ago we did some major updates to Reselect. Reselect 4.1.x has huge improvements to its TS types for better inference, and adds a new set of customization options like cache sizes > 1.
React Interview Questions - Part 2 (Mid - Senior Level)
2 projects | dev.to | 25 Dec 2021
Fourth, Use Reselect / Re-reselect in Redux to Avoid Frequent Re-render. Reselect is a library for building memoized selectors that is commonly used for redux.
I wrote an article about Redux architecture for SwiftUI, you can achieve pretty amazing stuff using it. Below Hot Reload implemented in 30 minutes. More links in comments. It's worth at least getting familiar with this architecture :)
6 projects | reddit.com/r/swift | 6 Dec 2021
Another great tool used in the Redux world is Reselect. Storing the bare minimum data in the Redux store and then deriving data with memoization using Reselect. I had to create a poor man's version here. Feel free to check it out :)
What are some problems with Redux?
6 projects | reddit.com/r/reduxjs | 30 Nov 2021
We've completely revamped the Reselect types in the last few weeks and added new cache size options to its API - see https://github.com/reduxjs/reselect/releases
React State Management
3 projects | reddit.com/r/reactjs | 24 Nov 2021
The React roadmap for beginners you never knew you needed.
42 projects | dev.to | 23 Nov 2021
5 projects | dev.to | 12 May 2022
This project was bootstrapped with Create React App, using the Redux and Redux Toolkit template.
Having horrible learning experience with React Redux, would love for some pointers how I should approach my project
1 project | reddit.com/r/learnprogramming | 6 May 2022
First thing I'd tell you is to use Redux Toolkit. It's made by the Redux team, in response to the common issue that Redux is confusing, and setting up Redux is even more confusing. It's a lot more straightforward, at least to set up, with Redux Toolkit.
How can you replace entire state in Redux Toolkit reducer?
1 project | reddit.com/r/codehunter | 4 May 2022
I'm working with the Redux Toolkit, which simplifies some Redux boilerplate. One thing they do is use Immer to allow you to directly 'modify' state (in fact, you're not). It works fine, except I don't know how to replace my section of state entirely. For instance, I want to do something like this
sortComparer in RTK switches the ordering of entities, how to avoid this?
1 project | reddit.com/r/reduxjs | 28 Apr 2022
I don't have an immediate suggested answer here, but I've filed https://github.com/reduxjs/redux-toolkit/issues/2297 to help keep track of it.
Can anyone recommend some production quality fullstack TS repos on Github?
7 projects | reddit.com/r/typescript | 15 Apr 2022
If you're building a mostly static site, don't worry about state management. If you are building a more stateful application, use Redux. While I personally disagree with many of their decisions, use Redux Toolkit. What's most important is getting everyone speaking the same language and having an opinionated framework means you'll have a source to point to when you run into disputes.
RTK Query: How to ensure 2 mutations for same field don't get executed right after one another?
1 project | reddit.com/r/reactjs | 7 Apr 2022
Why using Redux is inefficient for small/mid-sized apps?
4 projects | reddit.com/r/reactjs | 3 Apr 2022
We did actually have some selectors inside of createSlice wayyyy back in the early alpha days, but removed them before we hit 1.0 for those reasons.
Client-side routing in React with React Location
7 projects | dev.to | 31 Mar 2022
You can easily integrate React Location with external caches and storage like React Query, Apollo, SWR, and RTKQuery. The only downside of React Location is that it doesn't support SSR route matching or loading and hydration yet, but these features will be available soon.
6 projects | news.ycombinator.com | 29 Mar 2022
Not specifically. The general problem we were running into is:
- We recommend inferring `type RootState = ReturnType`
- That type comes from the slice reducers
- Thunks need a `State` type passed in so they know what `getState` returns
- But if you do that _inside_ of `createSlice`, TS can't know that `RootState` type yet, because we haven't constructed the slice reducer yet
Here was the PR where we tried to come up with something:
If you're seeing some other issue problem related to RTK, please go ahead and file an issue.
React, Vue and Svelte: Comparing State Management tools
2 projects | dev.to | 28 Mar 2022
What are some alternatives?
redux-saga - An alternative side effect model for Redux apps
zustand - 🐻 Bear necessities for state management in React
redux-thunk - Thunk middleware for Redux
react-query - ⚛️ Hooks for fetching, caching and updating asynchronous data in React
next-redux-wrapper - Redux wrapper for Next.js
vite - Next generation frontend tooling. It's fast!
Immer - Create the next immutable state by mutating the current one
Recoil - Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.
ducks-modular-redux - A proposal for bundling reducers, action types and actions when using Redux
redux-persist - persist and rehydrate a redux store
react-clean-architecture - A realistic approach to implement clean architecture on react codebases