Non-breaking, internal refactor to consolidate the app
stopping logic out of dispatch into update (previously
setState). Now the notion that null or undefined state
terminates the app is more convincing.
1. Return dispatch so it could be used for tooling,
automation, tests, and so on.
2. Make dispatch with no arguments stop the app (#873).
Stopping an app means that future calls to dispatch do
nothing and all active subscriptions are unsubscribed.
This reverses the restart order for subscriptions
by calling unsubscribe first and then subscribe.
Also avoids storing whatever unsubscribe returns,
which we don't need to keep track of anywhere.
There was no need to mutilate the VDOM shape beyond
recognition just to save a few bytes. Now each prop
clearly expresses its intent:
{
tag,
props,
children,
node,
type,
key,
}
* Use more ES6 idioms, arrow funcs, let, and remove hash-based routing by @jbucaran. #34, #35 & #36.
* Introduce webpack, transpile with babel, minify with babili by @maraisr.
* Add some tests by @maraisr
* Use src directory by @maraisr
* Use Travis and setup code coverage by @maraisr
Otherwise we can't correctly update the model via dispatch/send
inside subscriptions.
For the same reason, extract dispatch method outside the render
closure.
to boolean true and false.
This allows for html`<input type="checkbox" checked=${model.checked} />`
and the like.
Also flatten children array (not deep flatten for now).
* Elm arch implementation is more pure this time, but
more code was needed to transform hyperx attrs into
a data object that snabbdom/h can use.
* The reason to switch to Snabbdom is due to the project
significantly better results in some known vdom benchmarks,
smaller size and no deps (as opposed to virtual-dom that
had 8 deps, at the time of writing this commit).
* See also http://vdom-benchmark.github.io/vdom-benchmark