Changelog
[v0.6.1] - 2017-01-05
The biggest change in this release is that the Snabbdom source code has been ported to TypeScript. The work has been primarily done by @staltz. This brings much improved support for using Snabbdom in TypeScript projects.
Note: This release contains breaking changes. See below.
h(sel, data, node)
and h(sel, node)
shortcut notations in the h
function. #196. That is, instead of h('div', [child])
one can now do h('div', child)
. Thanks to @AlexGalays.parentNode
fixing bug in IE 11. #210. Thanks to @aronallen.The TypeScript rewrite uses the import
and export
features introduced in ECMAScript 2015. Unfortunately the ES imports have no analogy to the CommonJS pattern of setting module.exports
. This means that the Snabbdom modules that previously used this feature now have to be imported in a slightly different way.
/* eslint-disable no-redeclare */
const h = require("snabbdom/h"); // The old way
const h = require("snabbdom/h").h; // The new way
const h = require("snabbdom/h").default; // Alternative new way
const { h } = require("snabbdom/h"); // Using destructuring
/* eslint-enable no-redeclare */