You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,26 +9,26 @@ Intuitive magical memoization library with Proxy and WeakMap
9
9
10
10
## Project status
11
11
12
-
It's stable and productionready.
12
+
It's stable and production-ready.
13
13
As the technique behind it is a bit tricky with Proxy,
14
-
there might still be some bugs especially with nested memoized selectors.
14
+
there might still be some bugs, especially with nested memoized selectors.
15
15
16
-
> Note: Nesting memoized selectors is theoretically less performant.
16
+
> Note: Nesting memoized selectors are theoretically less performant.
17
17
18
18
Our docs and examples are not very comprehensive,
19
19
and contributions are welcome.
20
20
21
21
## Introduction
22
22
23
-
Immutability is pivotal in more than a few frameworks, like React and Redux. It enables simple-yet-efficient change detection in large nested data structures.
23
+
Immutability is pivotal in more than a few frameworks, like React and Redux. It enables simpleyetefficient change detection in large nested data structures.
24
24
25
-
JavaScript is a mutable language by default. Libraries like [immer](https://github.com/immerjs/immer) simplify *updating* immutable data strucutres.
25
+
JavaScript is a mutable language by default. Libraries like [immer](https://github.com/immerjs/immer) simplify *updating* immutable data structures.
26
26
27
-
This library helps *deriving data* from immutable structures (AKA, selectors), efficiantly caching results for faster performance.
27
+
This library helps *derive data* from immutable structures (AKA, selectors), efficiently caching results for faster performance.
28
28
29
29
This library utilizes Proxy and WeakMap, and provides memoization.
30
30
The memoized function will re-evaluate the original function
31
-
only if the used part of argument (object) is changed.
31
+
only if the used part of the argument (object) is changed.
32
32
It's intuitive in a sense and magical in another sense.
33
33
34
34
## How it works
@@ -38,7 +38,7 @@ it will wrap an input object with proxies (recursively, on demand)
38
38
and invoke the function.
39
39
When it's finished it will check what is "affected".
40
40
The "affected" is a list of paths of the input object
41
-
that are accessed during the function invocation.
41
+
accessed during the function invocation.
42
42
43
43
Next time when it receives a new input object,
44
44
it will check if values in "affected" paths are changed.
@@ -47,8 +47,8 @@ Otherwise, it will return a cached result.
47
47
48
48
The cache size is `1` by default, but configurable.
49
49
50
-
We have 2-tier cache mechanism.
51
-
What is described so far is the secondtier cache.
50
+
We have a 2-tier cache mechanism.
51
+
What is described so far is the second-tier cache.
52
52
53
53
The first tier cache is with WeakMap.
54
54
It's a WeakMap of the input object and the result of function invocation.
@@ -57,7 +57,7 @@ There's no notion of cache size.
0 commit comments