New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

web-server-components

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-server-components

SSR + Hydration minimal framework for Web Components with Declarative Shadow DOM

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

Web Server Components (WSC)

SSR + Hydration minimal framework for Web Components using Declarative Shadow DOM.

Install

npm install web-server-components

Example

import { WSC, withWSC } from "web-server-components";

class XHello extends WSC {
  static tagName = "x-hello";
  static template(props: { name?: string }) {
    return `<p>Hello, ${props.name ?? "World"}!</p>`;
  }
  connectedCallback() {
    this.hydrate();
  }
}

withWSC(XHello);

// Server-side:
console.log(XHello.render({ name: "Alex" }));

// Client-side:
document.body.appendChild(XHello.render({ name: "Alex" }) as HTMLElement);

Keywords

webcomponents

FAQs

Package last updated on 19 Aug 2025

Did you know?

Socket

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.

Install

Related posts