Skip to content

Commit 2684589

Browse files
committed
simplify wording around counts for dwyl#19
1 parent 27f2a8b commit 2684589

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ https://github.com/tastejs/todomvc/blob/master/app-spec.md#counter
280280
![javascript-todo-list-count](https://user-images.githubusercontent.com/194400/73112092-e73a5400-3f04-11ea-90f6-d4ae541a129c.png)
281281

282282
In order to display the `count` of items in the Todo list,
283-
we could store 3 values in the model:
283+
we _could_ store 3 values in the model:
284284

285285
+ `total_items` - the total number of items, in this case 3.
286286
+ `completed_items` - the number of completed items. in this case 1.
@@ -298,9 +298,10 @@ This is _unnecessary_ effort we can avoid.
298298
We can simply _compute_ these values based on the data in the `todos` Array
299299
and display them for the user without storing any additional data.
300300

301-
Rather than _storing_ a `counter` in the model
302-
(_the count of active and completed Todo items_)
303-
we will _compute_ (derive) it at "runtime" to keep the `model` simple.
301+
Instead of _storing_ any additional data for a `counter` in the model
302+
(_the count of active and completed Todo items_),
303+
we will _compute_ the count and display the count at "runtime".
304+
We don't _need_ to store any additional data in the `model`.
304305
This may use a few CPU cycles computing the `count`
305306
each time the view is rendered but that's "OK"!
306307
Even on an _ancient_ Android device

0 commit comments

Comments
 (0)