Get started with incremental-dom CDN
Apache-2.0 licensed
Incremental-DOM: library for efficiently updating DOM by modifying changed parts.
Tags:- incremental
- dom
Stable version
Copied!
How to start using incremental-dom CDN
// Include iDOM library from CDN
const IDOM = require('incremental-dom/min.js')(window.document);
// Create a new virtual DOM element
const element = IDOM.create('div', {
className: 'my-class',
innerHTML: 'Hello, World!'
});
// Create a real DOM element and attach the virtual element to it
const container = document.createElement('div');
IDOM.attach(container, element);
document.body.appendChild(container);
// Update the virtual DOM element
const newText = 'Hello, there!';
IDOM.setText(element, 'innerHTML', newText);
// Render the updates to the real DOM
IDOM.render(container);
Copied!
Copied!
Copied!
Copied!