O'Reilly logo
  • Ben Barreth thinks this is interesting:

If you try clicking one of the task’s checkboxes, it won’t change


Cover of Pro React


This simply isn't true! In chapter 1 we set those checkboxes to have a defaultChecked attribute equal to {task.done}, which DOES allow the checkboxes to be changed on click, it merely sets the default state of the checkbox. If we had instead used the checkbox attribute of "checked" (rather than "defaultChecked") then yes - the value would have been fixed and immutable like the author is saying...