Our store consists of items in a to-do list, like the following:
state: { todo: [ { id: 43, text: 'Buy iPhone', done: false }, ... ], archived: [ { id: 2, text: 'Buy gramophone', done: true }, ... ]}
We have two requirements:
- We must have an MARK_ITEM_AS_DONE mutation that changes the done field from false to true
- We must have a downloadNew action that downloads the latest items from our server and adds them to the list