From a79ef7fc29e4c58ebfc32aa96e7099cff1f5807a Mon Sep 17 00:00:00 2001 From: David Hellsing Date: Tue, 26 Nov 2013 18:07:56 +0100 Subject: [PATCH] Changed key from Math.random() to todo.cid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It doesn’t make much sense to generate a random key for each todo render, because it will re-draw all todo’s DOM nodes on each model change. I changed it to the unique identifier ``todo.cid`` already supplied by the backbone model. --- examples/todomvc-backbone/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/todomvc-backbone/js/app.js b/examples/todomvc-backbone/js/app.js index 4a2e557450..5223364556 100644 --- a/examples/todomvc-backbone/js/app.js +++ b/examples/todomvc-backbone/js/app.js @@ -236,7 +236,7 @@ var TodoApp = React.createClass({ var todoItems = this.props.todos.map(function(todo) { return (