Skip to content

Commit

Permalink
block mutations on proxy object
Browse files Browse the repository at this point in the history
  • Loading branch information
theKashey committed Jul 22, 2018
1 parent 12d8c05 commit f6fef16
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ The difference between proxyEqual and proxyShallow is in _expectations_.
* proxyShallow is similar to `shallowEqual`, it compares the top level objects. Might be they are still the same.
* proxyEqual working on variable-value level, performing (very) deep comparison of objects.

## Extra API
- `spreadGuardsEnabled(boolean=[true])` - controls spread guards, or all-keys-enumeration, which makes proxyEqual ineffective.
- `sourceMutationsEnabled(boolean=[false])` - controls set behavior. By default proxied state is frozen.

## When to use proxyequal
When you have a big state, for example redux state, but some function (redux selector, or mapStateToProps)
uses just a small subset.
Expand Down

0 comments on commit f6fef16

Please sign in to comment.