Skip to content

Commit 1f80549

Browse files
author
Vlad Balin
committed
Update readme.md
1 parent ebadb1d commit 1f80549

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/todomvc/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ And it will work this way 90% of the time, [no matter, how complex your data are
5757
##FAQ
5858
### How can you do pure render with mutable models? I heard it's impossible.
5959

60-
By comparing object's versions. For _immutable_ data, reference to the data itself can be used as version token, it's the same thing. For _mutable_ data, you need to introduce separate version token, so we do it.
60+
By comparing object's versions. For _immutable_ data, reference to the data itself can be used as version token, it's the same thing. For _mutable_ data, you need to introduce separate version token, so we do it. Let's understand how this mechanics works.
6161

6262
Every NestedTypes model and collection has `_changeToken` property, which contains empty object `{}` reassigned every time object is updated (and {} !== {}, they are separate objects allocated on heap). Inside of `shouldComponentUpdate`, we compare these version tokens for every model and collection listed in `props` with tokens used at last render. Thus, we're able to efficiently check whenever model or collection was changed since the last render.
6363

64-
It's works faster than any generic PureRenderMixin because we dynamically compile `shouldComponentUpdate` functions with _loops unrolled _, taking props list from component's `propTypes` (loops through hashes are very expensive, as well as `Object.keys` call).
64+
It's works faster than any generic PureRenderMixin because we dynamically compile `shouldComponentUpdate` functions with _loops unrolled_, taking props list from component's `propTypes` (loops through hashes are very expensive, as well as `Object.keys` call).
6565

6666
### What does `editing : ToDo.from( '^props.todos' )` from `todolist.jsx` mean?
6767

0 commit comments

Comments
 (0)