It's easiest for us to take the Android EditTask component from Chapter 2, Advanced Functionality and Styling the To-Do List App, and make changes to it. Additionally, referencing the updated iOS version of this component during these changes can also help.
Specifically, for the Android version of EditTask, we want to do the following:
- Swap out any references to the local state with the state tree made available via props
- Replace any unnecessary calls to the local methods, dispatching actions instead
- Keep the local methods for saving a task and opening both the date and time pickers
- Update the callback that pressing the back button triggers, resetting the selectedTaskObject in addition to calling ...