Converting EditTasks to Redux
With EditTasks
, we are introducing some new actions and reducers into the mix. These include:
- Setting the currently selected task to one that was pressed on in
TasksList
- Handling a change when the Cancel or Save buttons are pressed in the
EditTask
screen - Toggling the selected task as completed
- Changing the name of the selected task
- Adding, modifying, and removing the due date
- Expanding the expandable cell that shows and hides the
DatePicker
component
For the first two bullet points, those modifications will come in the form of three new actions placed in the TasksList
container, since that's the component where these events will either happen or be defined and passed to EditTask's navigator.
Our state tree will also need to hold the following new properties:
- The formatted and unformatted dates from the DatePicker component that point to the selected task
- An object pertaining to the currently selected task in the
EditTask
screen - An indication whether the
ExpandableCell
...