Skip to content

Commit 7e730c8

Browse files
authored
Merge pull request #37 from gamtiq/patch-1
fix: typos in README
2 parents ed5a57e + c514a60 commit 7e730c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ Sometimes is not easy to achive high cache hit ratio. Sometimes you have to _thi
2323

2424
**I don't want to think how to use memoization, I want to use memoization!**
2525

26-
Memoize-state is built to memoize more complex situations, even the ones which are faster to recomoute, than to deside that recalculation is not needed.
26+
Memoize-state is built to memoize more complex situations, even the ones which are faster to recompute, than to deside that recalculation is not needed.
2727
Just because one cheap computation can cause a redraw/reflow/recomputation cascade for a whole application.
2828

2929
Lets imagine some complex function.
3030
```js
3131
const fn = memoize(
32-
(number, state, string) => ({result:state[string].value + number})
32+
(number, state, string) => ({result: state[string] + number})
3333
)
3434
let firstValue = fn(1, { value: 1, otherValue : 1 }, 'value'); // first call
3535
firstValue === fn(1, { value: 1, otherValue : 2 }, 'value'); // "nothing" changed
@@ -40,7 +40,7 @@ All _ordinal_ memoization libraries will drop cache each time, as long `state` i
4040
More of it - they will return a unique object each time, as long the function is returning a new object each time.
4141
But not today!
4242

43-
Memoize-state memoizes tracks used __state__ parts, using the same __magic__, as you can found in __MobX__ or __immer__.
43+
Memoize-state memoizes tracks used __state__ parts, using the same __magic__, as you can find in __MobX__ or __immer__.
4444
It will know, that it should react only on some `state.value1` change, but not `value2`. _Perfect_.
4545

4646
Now you able just to write functions AS YOU WANT. Memoize-state will detect all _really_ used arguments, variables and keys, and then - react only to the _right_ changes.

0 commit comments

Comments
 (0)