We would like to have a Save button so that we can save our changes. We need to wrap our component in a form in order for this to work correctly (see Chapter 10). Here is our updated renderContentOn: method:

Now we can add a checkbox to change the status of a todo item, see Figure 104.

Figure 104: Our todo application with checkboxes and save buttons.

Note that the value of the checkbox is passed as an argument of the checkbox callback. The callback uses this value to change the status of the todo item. Notice the use of the submitButton to add a submit button in the form.