Skip to content

Commit ee3156a

Browse files
authored
Documentation/v3 (#55)
* prettier on README * typo fixes * update benchmarking graphic
1 parent 5d71c91 commit ee3156a

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77
[![npm version][npm_img]][npm_site]
88
[![Maintenance Status][maintenance-image]](#maintenance-status)
99

10-
1110
The fastest deep equal comparison for React. Really fast general-purpose deep comparison.
12-
Great for`shouldComponentUpdate`. This is a fork of the brilliant
11+
Great for `shouldComponentUpdate`. This is a fork of the brilliant
1312
[fast-deep-equal](https://github.com/epoberezkin/fast-deep-equal) with some
1413
extra handling for React.
1514

16-
1715
![benchmark chart](assets/benchmarking.png "benchmarking chart")
1816

1917
(Check out the [benchmarking details](#benchmarking-this-library).)
@@ -28,12 +26,12 @@ $ npm install react-fast-compare
2826

2927
## Highlights
3028

31-
* ES5 compatible; works in node.js (0.10+) and browsers (IE9+)
32-
* deeply compares any value (besides objects with circular references)
33-
* handles React-specific circular references, like elements
34-
* checks equality Date and RegExp objects
35-
* should as fast as [fast-deep-equal](https://github.com/epoberezkin/fast-deep-equal) via a single unified library, and with added guardrails for circular references.
36-
* small: under 700 bytes minified+gzipped
29+
- ES5 compatible; works in node.js (0.10+) and browsers (IE9+)
30+
- deeply compares any value (besides objects with circular references)
31+
- handles React-specific circular references, like elements
32+
- checks equality Date and RegExp objects
33+
- should as fast as [fast-deep-equal](https://github.com/epoberezkin/fast-deep-equal) via a single unified library, and with added guardrails for circular references.
34+
- small: under 700 bytes minified+gzipped
3735

3836
## Usage
3937

@@ -107,8 +105,8 @@ lodash.isEqual x 6,243 ops/sec ±0.72% (90 runs sampled)
107105
fastest: react-fast-compare,fast-deep-equal
108106
```
109107

110-
Two of these packages cannot handle comparing React elements (which are
111-
circular): `nano-equal` and `shallow-equal-fuzzy`.
108+
Two of these packages cannot handle comparing React elements, because they
109+
contain circular reference: `nano-equal` and `shallow-equal-fuzzy`.
112110

113111
### Running Benchmarks
114112

@@ -123,8 +121,8 @@ react-fast-compare@3 tracks fast-deep-equal@3.1.1
123121

124122
Now that `fast-deep-equal` has separate es5, es6, and es6 + React entry points, the main differences with this library are:
125123

126-
* `try/catch` guardrails for stack overflows from undetected circular references.
127-
* A single unified entry point for **all** uses. No matter what your target application is, `import equal fro 'react-fast-compare'` just works.
124+
- `try/catch` guardrails for stack overflows from undetected circular references.
125+
- A single unified entry point for **all** uses. No matter what your target application is, `import equal from 'react-fast-compare'` just works.
128126

129127
## License
130128

assets/benchmarking.png

-10.9 KB
Loading

0 commit comments

Comments
 (0)