File tree
Expand file treeCollapse file tree1 file changed
+3
-2
lines changed Expand file treeCollapse file tree1 file changed
+3
-2
lines changed Original file line number | Diff line number | Diff line change |
---|
@@ -582,10 +582,11 @@ edit it, and return the clone. This ensures that no other functions that are
|
582 | 582 | holding onto a reference of the shopping cart will be affected by any changes.
|
583 | 583 |
|
584 | 584 | Two caveats to mention to this approach:
|
585 |
| -1. There might be cases where you actually want to modify the input object, |
| 585 | +1. There might be cases where you actually want to modify the input object, |
586 | 586 | but when you adopt this programming practice you will find that those case
|
587 | 587 | are pretty rare. Most things can be refactored to have no side effects!
|
588 |
| -2. Cloning big objects can be very expensive in terms of performance. Luckily, |
| 588 | + |
| 589 | +2. Cloning big objects can be very expensive in terms of performance. Luckily, |
589 | 590 | this isn't a big issue in practice because there are
|
590 | 591 | [https://facebook..io/immutable-js/](great libraries) that allow
|
591 | 592 | this kind of programming approach to be fast and not as memory intensive as
|
|
You can’t perform that action at this time.
0 commit comments