fluorine-lib
DISCONTINUED
reselect
Our great sponsors
- Klotho - AWS Cloud-aware infrastructure-from-code toolbox [NEW]
- Appwrite - The Open Source Firebase alternative introduces iOS support
- Sonar - Write Clean JavaScript Code. Always.
- InfluxDB - Access the most powerful time series database as a service
- ONLYOFFICE ONLYOFFICE Docs β document collaboration in your environment
fluorine-lib | reselect | |
---|---|---|
0 | 41 | |
287 | 18,902 | |
- | 0.1% | |
0.0 | 6.4 | |
- | 6 days ago | |
JavaScript | TypeScript | |
Creative Commons Zero v1.0 Universal | 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.
fluorine-lib
We haven't tracked posts mentioning fluorine-lib yet.
Tracking mentions began in Dec 2020.
reselect
-
20 Essential Parts Of Any Large Scale React App
reselect : Selector library to optimize your store access
-
Revolutionize Your React App with Redux: A Beginner's Guide to Simplifying State Management(PART 2)
Reselect documentation:
-
20 Best Libraries and Tools for React Developers
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
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
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
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
-
Extreme Explorations of TypeScript's Type System
We do a _lot_ of this in the Redux library repos (examples: [0] [1] [2] ). We have some incredibly complicated types in our libraries, and we have a bunch of type tests to confirm expected behavior.
Generally, these can just be some TS files that get compiled with `tsc`, but it helps to have a bunch of type-level assertions about expected types.
I actually recently gave a talk on "Lessons Learned Maintaining TS Libraries" [3], and had a couple slides covering the value of type tests and some techniques.
[0] Redux Toolkit's `createSlice`: https://github.com/reduxjs/redux-toolkit/blob/9e24958e6146cd...
[1] Reselect's `createSelector`: https://github.com/reduxjs/reselect/blob/f53eb41d76da0ea5897...
[2] React-Redux's `connect`: https://github.com/reduxjs/react-redux/blob/720f0ba79236cdc3...
[3] https://blog.isquaredsoftware.com/2022/05/presentations-ts-l...
-
What's new in Redux?
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)
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 :)
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 alternatives?
Immer - Create the next immutable state by mutating the current one
recompose - A React utility belt for function components and higher-order components.
use-context-selector - React useContextSelector hook in userland
redux-toolkit - The official, opinionated, batteries-included toolset for efficient Redux development
react-redux - Official React bindings for Redux
effector-react - Business logic with ease βοΈ
mobx-react
redux-saga - An alternative side effect model for Redux apps
shasta - Dead simple + opinionated toolkit for building redux/react applications
fluxible - A pluggable container for universal flux applications.
redux-batched-subscribe - store enhancer for https://github.com/reactjs/redux which allows batching subscribe notifications.