diff --git a/README.md b/README.md index 7f4a330..fa1aaad 100644 --- a/README.md +++ b/README.md @@ -111,14 +111,15 @@ class App extends Keet { const app = new App() app.mount(html` - +
one
two
-
three
+
four
+ +
five
`).link('app') - ``` @@ -132,13 +133,13 @@ To map an array to elements use the ```{{model:}}{ ```js import Keet from 'keet' -import { html, createModel } from 'keet/utils' +import { html, createModel as CreateModel } from 'keet/utils' -let task = new createModel() +let task = new CreateModel() class App extends Keet { task = task - componentWillMount(){ + componentWillMount () { // callBatchPoolUpdate - custom method to inform changes in the model. // If the component has other states that reflect the model value changes // we can safely ignore calling this method. @@ -167,7 +168,7 @@ for (let i = 0; i < taskName.length; i++) { app.task.add({ id: i, taskName: taskName[i], - complete: i % 2 === 0 ? false : true + complete: i % 2 !== 0 }) } @@ -178,10 +179,7 @@ app.task.update('id', { complete: true }) -// remove a task app.task.destroy('taskName', 'roll') - -console.log(app) ``` @@ -218,7 +216,7 @@ const app = new App() app.mount(html`
parent
- {{component:subc}} +
`).link('app') diff --git a/examples/counter.js b/examples/counter.js index 64588a5..1e61cd6 100644 --- a/examples/counter.js +++ b/examples/counter.js @@ -1,4 +1,4 @@ -/* global Event */ +/* global Event */ // rem import Keet from '../' import { html, getId } from '../utils' diff --git a/examples/model.js b/examples/model.js index 721fe47..2450a28 100644 --- a/examples/model.js +++ b/examples/model.js @@ -23,7 +23,7 @@ const app = new App() let name = 'myModel' // rem // rem app.mount(html` -

${name}

+

${name}