
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
compostate-element
Advanced tools
Web Components bindings for compostate
npm install --save compostate compostate-element
yarn add compostate compostate-element
pnpm add compostate compostate-element
import { ref, effect } from 'compostate';
import { setRenderer, define } from 'compostate-element';
import { render, html } from 'lit-html';
// Setup the element's renderer using Lit
// Any renderer should work
setRenderer((root, result) => {
render(result, root);
});
// Define an element
define({
// Name of the element (required)
name: 'counter-title',
// Props to be tracked (required)
props: ['value'],
// Element setup
setup(props) {
// The setup method is run only once
// it's useful to setup your component logic here.
effect(() => {
// Props are reactive
console.log(`Current count: ${props.value}`);
});
// Return the template atom
// The template's returned value depends
// on the renderer's templates.
// For example, you can return a JSX markup
// if the renderer used is React or Preact.
return () => (
html`
<h1>Count: ${props.value}</h1>
`
);
},
});
define({
name: 'counter-button',
setup() {
const count = ref(0);
function increment() {
count.value += 1;
}
function decrement() {
count.value -= 1;
}
return () => (
html`
<button @click=${increment}>Increment</button>
<button @click=${decrement}>Decrement</button>
<counter-title value="${count.value}"></counter-title>
`
);
},
});
MIT © lxsmnsyc
FAQs
compostate + Custom Elements
The npm package compostate-element receives a total of 1 weekly downloads. As such, compostate-element popularity was classified as not popular.
We found that compostate-element 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.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.