Need advice about which tool to choose?Ask the StackShare community!

Recompose

37
19
+ 1
0
reselect

220
30
+ 1
0
Add tool

Recompose vs reselect: What are the differences?

## Introduction
This Markdown code compares and contrasts the key differences between Recompose and reselect.

1. **Higher-order Components vs Selector Functions**: Recompose primarily focuses on creating Higher-order Components (HOCs), which are used to enhance the functionality of existing components. On the other hand, reselect is more centered around the concept of selector functions, which compute derived data from the Redux store efficiently.
2. **Composition vs Memoization**: Recompose emphasizes composition, enabling developers to enhance components by composing multiple HOCs together. In contrast, reselect prioritizes memoization, allowing selectors to efficiently compute and store derived data.
3. **Component Enhancements vs Data Computation**: Recompose is primarily aimed at enhancing the functionality of components by providing a set of utility HOCs for tasks like state management, lifecycle methods, and more. In contrast, reselect focuses on efficiently computing and accessing derived data from the Redux store, improving performance in applications with complex state structures.
4. **Flexibility in Component Enhancements vs Efficiency in Data Computation**: Recompose offers flexibility in enhancing components by enabling developers to compose HOCs in various combinations to suit different requirements. Conversely, reselect prioritizes efficiency by ensuring that selectors only recalculate when their input data changes, reducing unnecessary computations.
5. **Use Cases**: Recompose is commonly used for simplifying component logic, handling props manipulation, and managing component state, while reselect is typically employed for optimizing performance in Redux applications by efficiently computing derived state.
6. **Dependence on Redux vs Standalone Usage**: Recompose is often used alongside Redux for managing component logic and state, while reselect can be utilized independently in any Redux application to enhance data computation within selectors.

In Summary, Recompose focuses on enhancing components through composition using Higher-order Components, while reselect specializes in efficiently computing derived data from the Redux store through memoized selector functions.
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More

What is Recompose?

It is a React utility belt for function components and higher-order components. A higher-order component (HOC) refers to a function that accepts a single React component and returns a new React component. Think of it like lodash for React.

What is reselect?

Simple “selector” library for Redux (and others) inspired by getters in NuclearJS, subscriptions in re-frame and this proposal from speedskater.

Need advice about which tool to choose?Ask the StackShare community!

What companies use Recompose?
What companies use reselect?
See which teams inside your own company are using Recompose or reselect.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Recompose?
What tools integrate with reselect?
What are some alternatives to Recompose and reselect?
Compose
Compose makes it easy to spin up multiple open source databases with just one click. Deploy MongoDB for production, take Redis out for a performance test drive, or spin up RethinkDB in development before rolling it out to production.
Modernizr
It’s a collection of superfast tests or detects as we like to call them which run as your web page loads, then you can use the results to tailor the experience to the user. It tells you what HTML, CSS and JavaScript features the user’s browser has to offer.
Modernizr
It’s a collection of superfast tests or detects as we like to call them which run as your web page loads, then you can use the results to tailor the experience to the user. It tells you what HTML, CSS and JavaScript features the user’s browser has to offer.
Lodash
A JavaScript utility library delivering consistency, modularity, performance, & extras. It provides utility functions for common programming tasks using the functional programming paradigm.
Moment.js
A javascript date library for parsing, validating, manipulating, and formatting dates.
See all alternatives