3 ms·
What’s the alternative for functional transforms in redux selectors?
by koolba 3y ago
What’s the alternative for functional transforms in redux selectors?
- woolly 3y agoI have used lodash/fp successfully in Javascript projects at current and previous job. Not sure about the TypeScript support.
- danenania 3y agoI like immer for this kind of thing: https://github.com/immerjs/immer https://github.com/immerjs/immer You can do immutable transformations without getting bogged down in FP abstractions.
- solardev 3y agoIf you use something like redux toolkit query, it already abstracts that for you using Immer internally. You can just write a simple arrow function or use lodash or underscore or whatever pleases you. https://redux-toolkit.js.org/usage/immer-reducers https://redux-toolkit.js.org/usage/immer-reducers