mostly-dom
TypeScript icon, indicating that this package has built-in type declarations

6.0.0 • Public • Published

Mostly DOM

A Type-Safe virtual-dom implementation. A virtual-dom implementation that works for you.

Mostly DOM is a virtual-dom implementation that provides strong types for everyday things like CSS values and HTML properties, you will be able to use itellisense to make your life easier. Say goodbye to a great deal of spelling mistakes.

Let me have it

npm install --save mostly-dom

Basic Usage

import { init, elementToVNode, h } from 'mostly-dom';
 
const patch = init([]);
const rootElement = document.querySelector('#app')
 
if (!rootElement) throw new Error('Unable to find root element')
 
const initialVNode = elementToVNode(rootElement);
const vNode = h('div', [ h('h1', 'Hello, World') ]);
 
patch(initialVNode, vNode);

/mostly-dom/

    Package Sidebar

    Install

    npm i mostly-dom

    Weekly Downloads

    35

    Version

    6.0.0

    License

    MIT

    Unpacked Size

    4.49 MB

    Total Files

    590

    Last publish

    Collaborators

    • tylors