@dashkite/flashdom
v0.1.37
Published
Diff and patch the DOM
Downloads
1,417
Readme
Flash DOM
Diff and patch the DOM
Features
- Incremental DOM updates and nothing else
- Small footprint (less than 2kB)
- Relies on native DOM APIs whereever possible, so it’s fast
- No need for VDOM: use DOM nodes directly
- Ideal for use with Web Components
Example
import { flash } from "@dashkite/flashdom"
# pass an HTML string
flash document.body, "<h1>Hello!</h1>"
# or a DOM element
h1 = document.createElement "h1"
h1.textContent = "Hello, world!"
flash document.body, h1
# may also pass a selector as the first argument
flash "body", "<h1>Goodbye</h1>"