react-fast-compare
npmv3.2.2TypeScriptFastest deep equal comparison for React. Great for React.memo & shouldComponentUpdate. Also really fast general-purpose deep comparison.
Not recommended for new projects
No — react-fast-compare should not be adopted for new projects. Last published 1210 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- FMaintenance: grade F, Failing.
Last published 1210 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 16 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 21 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding react-fast-compare to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- No constraint declared
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the react-fast-compare README.
const isEqual = require("react-fast-compare");
// general usage
console.log(isEqual({ foo: "bar" }, { foo: "bar" })); // true
// React.memo
// only re-render ExpensiveComponent when the props have deeply changed
const DeepMemoComponent = React.memo(ExpensiveComponent, isEqual);
// React.Component shouldComponentUpdate
// only re-render AnotherExpensiveComponent when the props have deeply changed
class AnotherExpensiveComponent extends React.Component {
shouldComponentUpdate(nextProps) {
return !isEqual(this.props, nextProps);react-fast-compare vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| react-fast-comparethis page | 0 | 1 | MIT | 3 years ago |
| fast-deep-equal | 0 | 6 | MIT | 1 day ago |
| deep-equal | 0 | 6 | MIT | 1 day ago |
| leven | 0 | 2 | MIT | 1 day ago |
| deep-is | 0 | 1 | MIT | 1 day ago |
| shallowequal | 0 | 1 | MIT | 1 day ago |
Dependencies
Declared by react-fast-compare v3.2.2. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (46)
Used by
Popular packages that depend on react-fast-compare.
Relationship graph
Dependencies (left) and dependents (right) of react-fast-compare.
Frequently installed together
Native navigation primitives for your React Native app.
Simple and complete React Native testing utilities that encourage good testing practices.
Declarative API exposing native platform touch and gesture system to React Native
React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.
More powerful alternative to Animated library for React Native.
The Expo SDK
Tools for making advanced Metro bundler features work
Error overlay for universal Expo apps.
React Native for Web
Escape RegExp special characters
React is a JavaScript library for building user interfaces.
React package for working with the DOM.
Release history
No releases in the last two years, typically about 53 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 3.2.2latest | 3 years ago | 16 KB | MIT |
| 3.2.1 | 3 years ago | 16 KB | MIT |
| 3.2.0 | 6 years ago | 18 KB | MIT |
| 3.1.1 | 6 years ago | 17 KB | MIT |
| 3.1.0 | 6 years ago | 17 KB | MIT |
| 3.0.2 | 6 years ago | 16 KB | MIT |
| 3.0.1 | 6 years ago | 16 KB | MIT |
| 3.0.0 | 6 years ago | 16 KB | MIT |
| 3.0.0-beta.1 | 6 years ago | 15 KB | MIT |
| 2.0.4 | 7 years ago | 11 KB | MIT |
| 2.0.3 | 7 years ago | 11 KB | MIT |
| 2.0.2 | 8 years ago | 11 KB | MIT |
| 2.0.1 | 8 years ago | 11 KB | MIT |
| 2.0.0 | 8 years ago | 11 KB | MIT |
| 1.0.0 | 8 years ago | 8.2 KB | MIT |
Overview
react-fast-compare is an npm package that fastest deep equal comparison for React. Great for React.memo & shouldComponentUpdate. Also really fast general-purpose deep comparison. It has 1 known dependents in the graph. The latest version is 3.2.2, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need fastest deep equal comparison for React. Great for React.memo & shouldComponentUpdate. Also really fast general-purpose deep comparison and value a focused solution.
When not to use it
Consider an alternative if you need to minimize your dependency tree, or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- Large dependency tree (46 direct dependencies) increases install size and audit surface.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use react-fast-compare?
No — react-fast-compare should not be adopted for new projects. Last published 1210 days ago.
How do I install react-fast-compare?
Run `npm install react-fast-compare` to add react-fast-compare to your npm project.
What license is react-fast-compare released under?
react-fast-compare is distributed under the MIT license.
How popular is react-fast-compare?
npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on react-fast-compare.
Is react-fast-compare still maintained?
The most recent release of react-fast-compare (v3.2.2) was published 3 years ago.
Does react-fast-compare run install scripts?
No. react-fast-compare does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.