A virtual DOM library with focus on simplicity, modularity, powerful features and performance.
dependabot[bot] on npm_and_yarn
chore(deps): bump parse-url fro… (compare)
jvanbruegge on master
chore(release): v3.5.1 (compare)
jvanbruegge on v3.5.1
@fuunnx @sebovzeoueb another solution besides using webpack@next
is to use an alias in webpack.config
module.exports = {
...
resolve: {
alias: {
snabbdom: path.resolve(__dirname, 'node_modules', 'snabbdom', 'build', 'package')
}
}
}
Then for TypeScript in the tsconfig
{
...
"paths": {
"snabbdom/*": ["node_modules/snabbdom/build/package/*"]
}
}
}
h('div.button', {on: {click: e => send({type: 'increment'})}}, 'Increment'),
h('div.button', {on: {click: [send, {type: 'increment'}]}}, 'Increment'),
browser-env
? it's a pretty reasonable shim for getting some window-like globals into node processes. I've used it for testing other dom related stuff: https://www.npmjs.com/package/browser-env
npm run compile
results in javascript files that do not work in the browser as is
&
and
are being renderer as text (i.e. you literally see the characters on the screen, not the symbol) - anyone know what might be going on there? (There's a good chance this isn't snabbdom related, I'm out of practice... :-) )
a & b, or a & b
<template>
properly ?
<div>
<template>
<style>h1 { color: red; }</style>
</template>
</div>
h("div", {}, [
h("template", {}, [h("style", {}, "h1 { color: red; }")]),
])
fragment
function from snabbdom but I can't seem to get it to properly generate a fragment inside the template)
<style>
is NOT inside the #document-fragment
). This is driving me nuts :-)
Property 'delayed' is incompatible with index signature.
Type '{ opacity: string; }' is not assignable to type 'string'
style: {
opacity: '0',
transition: 'opacity 1s',
delayed: { opacity: '1' }
}