hapiben / vue-vuex-todomvc

Example TodoMVC Vue.js app with Vuex store and server backend via REST

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vue-vuex-todomvc Build Status

Simple TodoMVC with Vue.js and Vuex data store.

Based on this Vuex tutorial and the basic official TodoMVC vue.js example

Read my step by step tutorial explaining the code and this thorough blogpost how this application is tested using Cypress.

Software organization

Vue Vuex REST data flow

Use

Clone this repository then

npm install
npm start

Open localhost:3000 in the browser.

Tests

All tests are implemented using Cypress.io

Development

The app global variable exposes the Vue instance.

To see "plain" values from the store (without all Observer additions)

app.$store.getters.todos
    .map(JSON.stringify) // strips utility fields
    .map(JSON.parse)     // back to plain objects
    .forEach(t => console.log(t)) // prints each object

Or print them as a table

console.table(app.$store.getters.todos.map(JSON.stringify).map(JSON.parse))

About

Example TodoMVC Vue.js app with Vuex store and server backend via REST


Languages

Language:JavaScript 92.3%Language:HTML 7.7%