Software requirements

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

Get Vue.js 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.