From 560ee9279189c4ec3c0630c7f6091ef1d2de06c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=B7=8D?= Date: Fri, 13 Jul 2018 01:10:36 +0800 Subject: [PATCH] fix(uncontrolled-element): fix error of 'changing an uncontrolled input of type checkbox to be controlled' --- chapter-04/todo/src/todos/views/todoItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter-04/todo/src/todos/views/todoItem.js b/chapter-04/todo/src/todos/views/todoItem.js index bbd8c6b..69b7030 100644 --- a/chapter-04/todo/src/todos/views/todoItem.js +++ b/chapter-04/todo/src/todos/views/todoItem.js @@ -1,7 +1,7 @@ import React, {PropTypes} from 'react'; const TodoItem = ({onToggle, onRemove, completed, text}) => { - const checkedProp = completed ? {checked: true} : {}; + const checkedProp = completed ? {checked: true} : {checked: false}; return (