Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ff6fdc1

Browse files
Fix side effect part 2 list
1 parent 6844730 commit ff6fdc1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,10 +582,11 @@ edit it, and return the clone. This ensures that no other functions that are
582582
holding onto a reference of the shopping cart will be affected by any changes.
583583

584584
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,
586586
but when you adopt this programming practice you will find that those case
587587
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,
589590
this isn't a big issue in practice because there are
590591
[https://facebook.github.io/immutable-js/](great libraries) that allow
591592
this kind of programming approach to be fast and not as memory intensive as

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /