From 5725676aa7a64799129cfc4e7d1b49482e555565 Mon Sep 17 00:00:00 2001 From: PNikray Date: Thu, 26 Feb 2015 19:37:05 +0100 Subject: [PATCH] Added the key attribute into the todo example This is to solve the warning (that the key should be set) that was being raised when adding a new item. --- _js/examples/todo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_js/examples/todo.js b/_js/examples/todo.js index 2ecea761f..de28d9cad 100644 --- a/_js/examples/todo.js +++ b/_js/examples/todo.js @@ -1,8 +1,8 @@ var TODO_COMPONENT = ` var TodoList = React.createClass({ render: function() { - var createItem = function(itemText) { - return
  • {itemText}
  • ; + var createItem = function(itemText, index) { + return
  • {itemText}
  • ; }; return ; }