
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
Picodom is a 1 KB VDOM builder and patch function.
import { h, patch } from "picodom"
let node
function render(view, withState) {
patch(node, (node = view(withState)))
}
function view(state) {
return (
<div>
<h1>{state}</h1>
<input
autofocus
type="text"
value={state}
oninput={e => render(view, e.target.value)}
/>
</div>
)
}
render(view, "Hello!")
Picodom supports keyed updates & lifecycle events — all with no dependencies. Mix it with your favorite state management library or create your own custom view framework.
Install with npm or Yarn.
npm i picodom
Then with a module bundler like Rollup or Webpack, use as you would anything else.
import { h, app } from "picodom"
Or download directly from unpkg or jsDelivr.
<script src="https://unpkg.com/picodom"></script>
Then find it in window.picodom.
const { h, app } = picodom
We support all ES5-compliant browsers, including Internet Explorer 10 and above.
Create virtual nodes with the built-in h() function. A virtual node is an object that describes a DOM tree.
const node = h("h1", { id: "title" }, "Hello.")
To create a component, define a function that returns a virtual node.
function AwesomeTitle(text) {
return h("h1", { class: "awesome title" }, text)
}
Fired after the element is created and attached to the DOM.
oncreate(Element)
Fired after the element attributes are updated. This event will fire even if the attributes have not changed.
onupdate(Element, oldProps: Attributes)
Fired before the element is removed from the DOM. Return a function that takes a remove() function and use it to remove the element asynchronously.
onremove(Element)
Use patch to diff two nodes and update the DOM. Patch returns the patched HTML element.
const element = patch(
oldNode: VNode,
newNode,
container
)
Picodom is MIT licensed. See LICENSE.
FAQs
This package is no longer supported and has been deprecated. To avoid malicious use, npm is hanging on to the package name.
The npm package picodom receives a total of 13 weekly downloads. As such, picodom popularity was classified as not popular.
We found that picodom demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.