diff --git a/.gitignore b/.gitignore
index 7582006..03944d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,11 @@
node_modules/
coverage/
-coverage.json
+dist/
tmp/
-npm-debug.log*
-.DS_Store
.sauce-credentials.json
-*.swp
sauce_connect.log
+npm-debug.log*
+coverage.json
+.DS_Store
+*.swp
.zuulrc
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 60c7349..f6cf156 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,14 @@
+## `3.1.0`
+And another patch down. This time around it's mostly maintenance and a bit of
+perf:
+- The addition of the [nanoraf](https://github.com/yoshuawuyts/nanoraf)
+ dependency prevents bursts of DOM updates thrashing application performance,
+ quite possibly making choo amongst the fastest frameworks out there.
+- We now ship standalone `UMD` bundles on each release, available through
+ [https://npmcdn.com/choo](https://npmcdn.com/choo). The goal of this is to
+ support sites like codepen and the like; __this should not be used for
+ production__.
+
## `3.0.0`
Woooh, happy third birthday `choo` - _thanks dad_. You're all grown up now;
look at how far you've come in the last month. You've grown... tinier? But yet
diff --git a/README.md b/README.md
index c97fc80..0bea209 100644
--- a/README.md
+++ b/README.md
@@ -43,11 +43,6 @@
-
-
-
-
@@ -148,7 +148,7 @@ To run it, save it as `client.js` and run with [budo][budo] and
[es2020][es2020]. These tools are convenient but any [browserify][browserify]
based tool should do:
```sh
-$ budo 'client.js' -p 8080 --open -- -t es2020
+$ budo client.js -p 8080 --open -- -t es2020
```
And to save the output to files so it can be deployed, open a new terminal and
@@ -246,7 +246,7 @@ app.model({
namespace: 'todos',
state: { items: [] },
reducers: {
- add: (data, state) => ({ todos: state.items.concat(data.payload) })
+ add: (data, state) => ({ items: state.items.concat(data.payload) })
}
})
```
@@ -361,6 +361,15 @@ const view = (state, prev, send) => {
```
In this example, when the `Add` button is clicked, the view will dispatch an `add` action that the model’s `add` reducer will receive. [As seen above](#models), the reducer will add an item to the state’s `todos` array. The state change will cause this view to be run again with the new state, and the resulting DOM tree will be used to [efficiently patch the DOM](#does-choo-use-a-virtual-dom).
+## Badges
+Using `choo` in a project? Show off which version you've used using a badge:
+
+
+[](https://github.com/yoshuawuyts/choo)
+```md
+[](https://github.com/yoshuawuyts/choo)
+```
+
## API
This section provides documentation on how each function in `choo` works. It's
intended to be a technical reference. If you're interested in learning choo for
diff --git a/examples/async-counter/client.js b/examples/async-counter/client.js
index b5cd831..f7f7354 100644
--- a/examples/async-counter/client.js
+++ b/examples/async-counter/client.js
@@ -1,5 +1,6 @@
const choo = require('../../')
const html = require('../../html')
+const plur = require('plur')
const app = choo()
app.model({
@@ -21,10 +22,12 @@ app.model({
})
const mainView = (state, prev, send) => {
+ const count = state.counter;
+
return html`