Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.gitignore
LICENSE Adds todomvc-app-vue sample Jul 17, 2019
README.md Refactors the acceptors to use SAM's new style (on function) Jul 19, 2019
app.js Adds methods to edit the task's title Jul 19, 2019
index.html
package-lock.json Adds todomvc-app-vue sample Jul 17, 2019
package.json
sam.js
yarn.lock

README.md

vue-todo-app

Based on on Adrian Mejia's tutorial Learn Vue.js doing a Todo app with routing

The business logic has been entirely externalized (sam.js) and the two-way data binding has been eliminated.

Vue requires direct access to the application state. This is accomplished via the addComponent method:

const { intents, state } = addComponent({...})

It seemed easier to overlay some bits of rendering logic on top of it:

const localState = (prop) => {
  if (prop && typeof prop === 'object') {
    const todos = state()._todos;
    const index = todos.indexOf(prop);
    return todos[index];
  }
  if (prop === 'todos') {
    return state('_todos');
  }
  return state(prop);
}
You can’t perform that action at this time.